Specifically, I'm using bzr, but tips for any VCS are welcome.
views:
64answers:
2
+4
A:
I think there are three options.
Use shelving
bzr shelve --all
bzr unshelve
Create a separate branch with the latest
- Create a patch of you changes and revert the changes. Apply patch when you need your changes back.
Chandra Patni
2009-12-30 21:59:44
Shelving is what I needed.
Matthew
2009-12-30 22:40:12
+1 Excellent answer :)
Kristopher Ives
2009-12-30 22:56:48
You may want to use `bzr shelve --all` if you don't want to go through usual interactive selection process.
bialix
2009-12-31 07:58:07
Thanks for the comments. I have modified the answer.
Chandra Patni
2009-12-31 08:01:18
+2
A:
Using 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
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:
git stash # save the uncommitted changes away
make # ...
git stash pop # restore your uncommitted changes
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.
Greg Hewgill
2009-12-30 22:00:22