切换分支时保存/恢复 git/cvs 签出更改?
使用cvs,git或其他技术(文件系统级别?),我想:
对分支A进行修改
签出分支B:对分支A的更改被“存储”离开”(按名称就好),分支 B 被签出,这样我的分支 A 更改就消失了
对分支 B 进行修改
签出分支 A:对分支 B 的更改被“隐藏”(按名称就好) ),分支 A 被签出,这样我的分支 B 更改就消失了,但现在我从步骤 #2 中“保存”的分支 A 更改又回来了
Git-stash 似乎不符合我描述的流程,尽管我的印象可能是错的。
欢迎使用涉及 RCS、文件系统、命令行工具或其他工具的技术。
Using cvs, git or another technique (file system level?), I would like to:
Make modifications on branch A
Checkout branch B: Changes to branch A are "stowed away" (by name would be nice), branch B is checked out such that my branch A changes are gone
Make modifications on branch B
Checkout branch A: Changes to branch B are "stowed away" (by name would be nice), branch A is checked out such that my branch B changes are gone but now my "saved" branch A changes from Step #2 are back
Git-stash does not appear to fit the flow I'm describing although my impression could be wrong.
Techniques involving RCS's or file system or command-line tools or otherwise are welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
git stash 是您正在寻找的工具,
它应该可以工作
git stash is the tool you are looking for
this should work
除了不自动发生之外,git-stash 为何不适合您的工作流程?这听起来正是 git-stash 的用途。
http://book.git-scm.com/4_stashing.html
How does git-stash not fit your workflow, beyond not happening automatically? This sounds like exactly what git-stash is for.
http://book.git-scm.com/4_stashing.html