Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save/restore local changes at SVN

Tags:

svn

How can I save my all local changes in SVN, revert them, and then restore them later?

like image 886
Brans Avatar asked Oct 19 '25 13:10

Brans


1 Answers

The feature you describe is sometimes called shelving or stashing. Subversion does not offer it.

It's possible to simulate it with patches:

  1. You create a patch
  2. You revert changes
  3. You work on something else and commit
  4. You apply the previously created patch

Some editors like NetBeans can do it for you transparently. There're also third-party scripts.

Optionally, you can create a temporary branch, commit your pending changes there, switch back to previous branch and finally port changes back (svn merge) when you're done.

Aside from raw Subversion, it's possible to have this feature with some of your helper tools. For example, TortoiseSVN has it and so do JetBrains IDEs like PhpStorm. Those are local features so they won't be visible in other Subversion clients, but they can work for you.

like image 102
Álvaro González Avatar answered Oct 21 '25 15:10

Álvaro González



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!