Basically I want to stage my changes without pushing them and without switching branches. This allows me to do some work, commit
it when I am at a good stopping point, and then continue work in the same branch. If I mess up, I can revert
, if I add new changes, I can just commit
again.
I realize I can create a feature branch in SVN to track these changes, but again, I'd like to do so while staying in the same branch/trunk. Even the equivalent of git stash
would suffice, although it seems SVN doesn't have that feature.
Correct, svn commit will push your local modifications to the server.
So commiting changes without pushing allow the save-load behaviour done locally during development. Once you are happy with your work, you then commit AND push.
Select any file and/or folders you want to commit, then TortoiseSVN → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.
The very point of distributed version control is this feature of local commits that can at a later point be merged with the upstream repository. SVN is not distributed and cannot do it. The central hindrance is SVN's linear revision numbering, which implies that every client must get a new identifying revision number for each changeset. Since "allocating" a revision number and later using it would lead to all kinds of race conditions, the "commit" and "push" actions are atomic in SVN and every non-distributed version control system.
That being said, git's SVN frontend is a good choice, like Joe suggested. It makes sure that SVN never sees your local, individual commits, and the "push" is translated into a single, big SVN commit.
By design SVN does not, however you can use git's git svn
command as a front-end to SVN. It allows you to do push/pull work from an SVN remote but still uses git locally, and thus to make local commits without pushing to SVN repository.
Something like this might help: http://www.viget.com/extend/effectively-using-git-with-subversion/
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