Skip to content
Prev 8132 / 21312 Next

[Bioc-devel] Git-svn: getting it to work while keeping your git history

Leo,

You can use your current git repo, please don't delete it or your history!

The most foolproof way of using git-svn with existing git history is to use
`git cherry-pick` to
pick commits to add to the `devel` branch rather than merging changes from
the master
branch. This will avoid including the old pre-bioconductor inclusion
commits so you won't have the rebase issues. You can use merges in your
master branch
(including from pull requests), but when you want to commit those changes
to SVN you need
 to cherry pick the individual commits to include.

You can give `git cherry-pick` a commit range to include like `git
cherry-pick
52a6636565..408659187` and it will include all commits within that range.

So the workflow would be, do work and commit in master then,

```bash
git checkout devel
git svn rebase

# figure out what commit range to use and cherry pick them
git log master
git cherry-pick 52a6636565..408659187

git svn dcommit
```

In this way your devel branch remains completely linear (so no conflicts
from git-svn) and you can retain your
full git history in your master branch.

I hope this makes sense, let me know if you have questions!

Jim

On Thu, Oct 15, 2015 at 12:04 PM, Leonardo Collado Torres <lcollado at jhu.edu>
wrote: