Git stash and git stash pop

Source: Internet
Author: User

ZZ: http://blog.csdn.net/herbert5069/article/details/6859563

$ Git stash can be used to temporarily store ongoing work, for example, to update pullCodeAnd don't want to add a new commit, or in another case, to fix an urgent bug, stash first, so that it returns to itself a commit, and stash pop after fixing the bug, continue the original work.
Basic commands:
$ Git stash
$ Do some work
$ Git stash pop

Advanced:
After you use the 'git stash 'command multiple times, your stack will be full of uncommitted Code. At this time, you will be confused about which version will be applied back, the 'git stash list' command can print the current git stack information. You only need to find the corresponding version number, for example, you can use 'git stash apply stash @ {1} 'to obtain the job with the specified version number stash @ {1, when you apply all the stacks back, you can use 'git stash clear' to clear the stacks.

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.