GIT SVN Notes
Commands
- 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.
[svn]
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:
- Take a backup of your repo/changes
- Abort the rebase: 'git rebase --abort' - Note that 'git svn' is not used for this command.
- Hard reset your checkout: 'git reset --hard ORIG_HEAD'
- Rerun your rebase as above.
Useful Links
No comments:
Post a Comment