How can I save my all local changes in SVN, revert them, and then restore them later?
The feature you describe is sometimes called shelving or stashing. Subversion does not offer it.
It's possible to simulate it with patches:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With