-
1. Re: Migration to Git
thomas.diesler Apr 22, 2010 9:16 AM (in response to thomas.diesler)After lots of research into finding the right workflow I came to the conclusion that it is impractical to keep SVN as the master. The reason is that
git svn dcommit
alters your git commit message (i.e. it adds a git-svn-id), which generates a different SHA1. So you cannot pull changes from a git repo into a git-svn repo and expect both repos to stay in sync.
An example:
- David clones the jbosgi from github and does lots of great work on it - David asks Thomas to pull his changes in the git-svn master - Thomas does git-svn rebase to pickup the latest trunk changes from Ales, who also did great work - Thomas pulls in Davids changes the HEAD is at abc123... - Thomas does git-svn dcommit to commit Davids changes to SVN - git-svn does its work and puts the git-svn-id in every git commit msg - The git-svn HEAD is at def456...
David's HEAD is not the same as the git-svn HEAD any more. the two repo's have diverged and Thomas cannot pull David's next changes any more. The only way (I know of) Thomas can fix this, is to ask David to do a hard reset to the branch point where he started his work (i.e. to the last commit that contains a git-svn-id). After the reset David needs to rebase his repo to get in sync with the git-svn repo. This effectivly pulls in his own changes plus the ones that Ales did.
In short, this is a nightmare and I abandoned the idea to keep the github HEAD in sync with the git-svn head. BobMcWirther also mirrors some jboss projects on Github. the commits however only flow from SVN to github and not vice versa. If you know a workflow that works bidirectionally, pleases let me know.
To avoid confusion I removed SVN trunk from all projects that have already been migrated to Github. At the end of Beta8 we can decide whether we want to stay with Git.
Folks who prefer to work with SVN can do so in an SVN branch that they copy from the latest tag. I'll pull the changes into the GitHub master when needed.