One of the things I like about GIT is that you can commit only some changes in a file. For example if you were doing two different changes which involved the same file, you can commit the file as two separate commits with different comments.
Like:
I spent all day working on a file before realizing that the previous days changes had not been commits, I can do the following by selecting which lines I would like to include in the commit:
Login.php [246]: previous changes
Login.php [247]: new changes
I realise that this ability is because the changeset in GIT is a DIFF, while SVN simply commits an entire file. Is it possible to have the same behavior with SVN?
If there is a SmartSVN specific hack then that would be alright since that is what we use.
If your working copy is up to date and there are no conflicts, you are ready to commit your changes. 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.
In order to commit only the explicit paths specified on the command line use the --depth empty option e.g. in the directory with the newly modified externals property: $svn commit --depth empty . -m "Modify svn externals definition only."
Commit uploads your changes on the CVS / SVN server, and Update overwrites the files on your localhost with the ones on the server.
Use git-svn, I don't think SVN has this support, or rather any of the SVN clients do apart from git-svn or even hgsubversion
Some rant:
I don't think the reason you ask for this is a proper one. It means you have to change the way you create changesets and commit. The reason I would want such a feature is for the following reason:
Say there is a build file. It has a certain set of tasks to be done in the build server. For my local box, I comment out the part where it generates installers because I don't need to do that on dev box. Now if at sometime I want to make a change in this build file, I have to undo the part where I removed the installer generation and commit my other change. In this case, I would have liked to have the ability to choose the other change and commit that alone.
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