Git fallback to a version of the method:
One: Record the hash value of the fallback
First, check which version you want to fall back to
Method 1:git Log
Will show the latest commit record, then you press the "Down" button on the keyboard to see more commit records, remember which version of the hash you want to rewind
Method 2:git Reflog
Will show a record of the most recent action, and then you'll remember the hash value to be rolled back
Two: Perform a fallback command
Once you know the hash value, the next step is to point to the fallback command:
Git reset--hard + version number back to this version status
This way you can go back to any one version, very convenient.
For more iOS development techniques, please follow:
Public Number: Iosdevtip
Latest iOS, iphone news, thousands of iOS developers, swift development, fruit powder aggregation, participate in technical discussions, organize development skills, share entrepreneurial experience! Enjoy life, love programming!
iOS development: Git command returns any version of the method