-1

I am trying to check in a specific part of a file into SVN, Example I have a file named Example.cs which is already on SVN in which I have added two new methods but I just want to check in just one method and hold onto the other one for a later time.

Is this possible?

DoIt
  • 3,270
  • 9
  • 51
  • 103
  • Modify the file to the state in which it should be checked in. Check it in. Then make further modifications locally as desired. It seems kind of silly and error-prone to manually pick and choose lines of code for checking in. Any given committed revision of the codebase should be complete and compile-able. – David Feb 02 '16 at 17:15

1 Answers1

0

You can use a svn patch for storing your second method, and apply the patch for later.

store the patch

svn diff > patch_name.patch

Revert your change

svn revert -R .

apply the patch

$ cd /workingcopy

$ svn patch /path/to/patch_name.patch

Reference:

Temporarily put away uncommited changes in Subversion (a la “git-stash”)

Using patch as a subversion stash

svn patch

Community
  • 1
  • 1
Z.Z.
  • 674
  • 6
  • 16