TortoiseSVN - push only a subset of modified files to branch while leaving the rest

155 views Asked by At

Let's say I have a branch where I have modified a couple of files. Let's say these files are file1 and file2.

Inside file1 I have made modifications that affect only a feature that I'm currently implementing in my own branch. However inside file2 I have made modifications that fixes a bug that affects other branches from other developers.

I was told that I can push only file2 inside branch so that it will be made available to everyone else. The problem is I have no idea how to do that.

Do I have to commit all modifications in my branch and then somehow push only the committed changes to file2 or can I make a "partial commit" (if such thing exists) for my file2 and then push the changes from that commit to branch? I am using TortoiseSVN 1.8.10 (not allowed to update it).

2

There are 2 answers

0
rbaleksandar On BEST ANSWER

There seem to be two solutions:

  • Download trunk and replace the required files. Of course this should only be done if you are absolutely sure that the modifications don't break anything. Since I made a recent update of my branch (today actually) I'm sure that there are no problems with the modifications.
  • Commit all changes except the ones you want to push to trunk, switch to trunk, commit the specific files there and then switch back to your own branch
1
Rani El-Maalouf On

From my limited experience, whenever I try to commit using tortoise, you can see all the files that will be commited and uncheck the ones you don't want to commit.