How to use the "go" Git stash

Source: Internet
Author: User

Command: Git stash
1. Using Gitstash to save the current work site, you can switch to another branch to work, or do other urgent work on the current branch, such as revising a bug test submission.
2. If a git stash is used to switch to a branch, and the work on that branch is not completed, it needs to save its work site. Then use the Gitstash. Then there are two job sites in the stash queue.
3. You can use Git stash list. View the stash queue.
4. What to do if you want to restore a job site on a branch: first use git stashlist to view the stash queue. Determine which work site to restore to the current branch. Then use git to stash pop [email protected]{num}. Num is the number of the job site you want to restore.
5. If you want to empty the stash queue, use git stash clear.
6. Also note that using the git stashpop command is to restore the stash queue [email protected]{0}, the top-level job site. and using the pop command to recover the work site, its corresponding stash is deleted in the queue. Using the git stash apply [email Protected]{num} method is not the same as Git stashpop except Stash queue deletion.

Transferred from: http://blog.sina.com.cn/s/blog_682d2aaf01016d9d.html

How to use the "go" Git stash

Related Article

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.