I'm working on a project that is being versioned with svn. Normally with git, I would pick which files I'd like to make as part of a commit with git add, and then make a commit. The problem is, I don't know if there is a similar way to do something like that in subversion. I end up working on a feature, then get interrupted to fix a bug.. and end up having to commit both of them at once. Is there a smarter way to handle staging of commits so my bug fix and feature can be separate commits in svn? I don't want to branch either, because that's god awful in subversion.
Use a changeset. You can add as many files as you like to the changeset, all at once, or over several commands; and then commit them all in one go. svnbook.red-bean.com/en/1.6/svn.advanced.changelists.html -- The svn keyword is "changelist", which is addressed in the first answer and most upvoted.
But in SVN, apparently, there is no such staging state.
Commit uploads your changes on the CVS / SVN server, and Update overwrites the files on your localhost with the ones on the server.
Two options:
svn commit file1 file2 ...
, or use a
client like TortoiseSVN that provides a GUI for doing so.(Really, in recent versions of Subversion and with a good client like Tortoise, I don't think branching is as awful as it's made out to be, but that's another story...)
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