具体来说,我使用的是 bzr,但欢迎使用任何 VCS 的提示。
问问题
83 次
2 回答
5
我认为有三种选择。
使用搁板
bzr shelve --all
bzr unshelve
使用最新创建一个单独的分支
- 为您的更改创建一个补丁并还原更改。当您需要更改时应用补丁。
于 2009-12-30T21:59:44.033 回答
2
使用Git:
git checkout HEAD^ # get the previous version, changing files on disk to match
make # run your project (or whatever command you use)
git checkout master # return to the "master" branch
如果您已经提交了您正在处理的任何当前更改,并且想要返回上一个提交,则上述内容适用。如果您有尚未提交的更改,请使用stash:
git stash # save the uncommitted changes away
make # ...
git stash pop # restore your uncommitted changes
您可以在 stash 和 pop 之间进行和提交其他更改;这是 Git 对“boss 中断并立即修复错误请求”问题的解决方案。
于 2009-12-30T22:00:22.113 回答