Sunday, 14 August 2016



  • git svn rebase This fetches revisions from the SVN parent of the current HEAD and rebases the current (uncommitted to SVN) work against it.
  • git svn dcommit Commit each diff from the current branch directly to the SVN repository, and then rebase or reset (depending on whether or not there is a diff between SVN and head). This will create a revision in SVN for each commit in Git.
  • git rebase -i HEAD~5 Squash multiple local commits into a single commit. Typically used before dcommit’ing to the svn repository.

Deleting directories from the repo.

It is recommended to add the following to your ~/.gitconfig when using git svn, otherwise locally deleted directories will not be removed in the repository.

        # push empty directory removals back to svn as directory deletes
        rmdir = true

Handling Permission denied when rebasing:

If you get permission denied when rebasing (I've seen this in windows because my editor was locking files & directories), close any editors, explorer windows which are using files within the repository, Then:
  1. Take a backup of your repo/changes
  2. Abort the rebase: 'git rebase --abort' - Note that 'git svn' is not used for this command.
  3. Hard reset your checkout: 'git reset --hard ORIG_HEAD'
  4. Rerun your rebase as above.

No comments:

Post a Comment