我正在开发一个项目,我想看看它在最新版本中的运行情况。我该如何做才能不丢失我的更改?
具体来说,我使用的是 bzr,但欢迎提供任何 VCS 的提示。
Specifically, I'm using bzr, but tips for any VCS are welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为有三种选择。
使用搁置
bzr 搁置 --all
bzr 取消搁置
创建一个单独的分支
最新
更改并恢复更改。
当您需要时应用补丁
变回来。
I think there are three options.
Use shelving
bzr shelve --all
bzr unshelve
Create a separate branch with the
latest
changes and revert the changes.
Apply patch when you need your
changes back.
使用 Git:
如果您已经提交了当前正在处理的任何更改,并且想要返回到上一个提交。如果您有尚未提交的更改,请使用 stash :
您可以在存储和弹出之间进行并提交其他更改;这是 Git 针对“老板因立即错误修复请求而中断”问题的解决方案。
Using Git:
The above applies if you've already committed whatever current changes you're working on, and want to go back to the previous commit. If you have changes that have not been committed yet, then use the stash:
You can make and commit other changes in between the stash and the pop; this is Git's solution to the "boss interrupts with an immediate bug fix request" problem.