[英]Git command line equivalent of GitHub app's magic stashing?
According to the GitHup app documentation, " when you switch branches, GitHub [for Mac] performs magic stashing " (eg, see the end of this page). 按照GitHup应用程序文件,“ 当您切换分支,GitHub的[为Mac]表演魔术积攒 ”(例如,见结束此页)。
Does anyone know the git command line equivalent of this "magic stashing"? 有没有人知道git命令行相当于这个“神奇的藏匿”?
Suppose you are working on the branch current-branch . 假设您正在处理分支当前分支 。 Basically, what happens in Git-terms:
基本上,Git术语中会发生什么:
git stash
git checkout other-branch
Then, when you checkout current-branch again. 然后,当您再次结帐当前分支时。 The following happens
发生以下情况
git stash pop
The git stash stores the uncommitted changes in the working directory. git stash存储工作目录中未提交的更改。 When you return the branch, a git stash pop is used to grab the uncommitted changes from the stash and place them on top of the current-branch
当你返回分支时,git stash pop用于从存储中获取未提交的更改并将它们放在当前分支的顶部
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.