I am working on a project and I want to see how it worked in its latest edition. How can I do this without losing my changes?

In particular, I use bzr, but tips for any VCS are welcome.

+3
source share
2 answers

I think there are three options.

  • Use shelving

    bzr shelve --all
    bzr unshelve

  • Create a separate branch using the latest

  • Create a patch from you modifies and discards the changes. Apply the patch when you need to change back.
+5
source

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

, , , . , , stash:

git stash             # save the uncommitted changes away
make                  # ...
git stash pop         # restore your uncommitted changes

; Git " ".

+2

Source: https://habr.com/ru/post/1726936/


All Articles