iOS development: Git command returns any version of the method

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.