Git migration

From K5Wiki
Revision as of 13:02, 5 July 2012 by TomYu (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The main krb5 source repository migrated from Subversion to Git during the weekend of 2012-05-11. More general information about accessing the new repository is at:

Rebasing existing krb5-anonsvn forks

Some collaborators have forked the existing krb5-anonsvn repository on GitHub. The conversion process involves making some history edits to make the log messages more readable in typical Git tools. While this will provide a better experience for Git users going forward, the new repository has a history that is disjoint from the history of the krb5-anonsvn repository. It is possible to rebase existing local work that was based off the krb5-anonsvn repository, but normally the disjoint histories will prevent a normal rebase from working due to merge conflicts.

The following example makes these assumptions:

  • Your Git remote for the krb5-anonsvn repository is named "origin" (which is probably true if you created your local repository using git clone)
  • The local branch that you want to rebase is currently checked out, is named "master", and is based off of "origin/master"
git remote add krb5 git://github.com/krb5/krb5.git
git fetch krb5
git rebase --onto krb5/master origin/master

If you want to rebase multiple branches that are based off of "origin/master", you may want to save some typing by giving an explicit local branch name at the end of the git rebase command, which will check out a copy of the specified branch first.

Using git rebase --onto may not necessarily work well if your local branch has merge commits in it.

Switching from a krb5-anonsvn.git GitHub fork to a krb5.git GitHub fork

You may want to switch some of your work from a GitHub fork based off of krb5-anonsvn.git to a GitHub fork based off of krb5.git. The following example assumes:

  • You have your own GitHub repository (assuming your GitHub username is "myname") forked from krb5.git (the new official krb5 repository mirror)
  • You have some work in your own GitHub repository forked from krb5-anonsvn.git (the old krb5 repository mirror from anonsvn) in a branch named "mybranch" that is based on the "master" branch of krb5-anonsvn.git.
git clone git://github.com/myname/krb5.git
cd krb5
git remote add anon git://github.com/myname/krb5-anonsvn.git
git fetch anon
git checkout -b mybranch anon/mybranch
git rebase --onto origin/master anon/master

Using the new repository

Some procedures for interacting with the new repository are at:

This includes advice for committers and for contributors who are preparing contributions using a GitHub fork (or other downstream Git repository).

Conversion process details

Additional information about the process of converting the repository from Subversion to Git:

Relevant mailing list messages