On Fri, Dec 11, 2009 at 04:00:53PM -0600, Alex Elder wrote:
> This change corrects a problem with the way I re-based the master branch
> when I updated things yesterday. The result is a cleaner git commit
> history, but this whole sequence is unfortunately a bit confusing.
>
> Note that you may need to reset your private git tree to ensure you
> are based on the new top-of-tree commit, which is has commit-id:
> 44a743f68705c681439f264deb05f8f38e9048d3
For those that aren't git-savvy, you can't there directly if you
have the tree with commits that got removed by the rebase (i.e. if
you updated your tree in the past day or so):
$ git fetch git://oss.sgi.com/xfs/xfs.git master:master
>From git://oss.sgi.com/xfs/xfs
! [rejected] master -> master (non fast forward)
$
New fetches won't fast forward because of the history mismatches, so
you need to set the history back in time to a common point before
the fetch will roll history forward again. I used the linux-2.6.32
release commit as the common point in history between the old tree
and the newly rebased tree:
$ git log --pretty=oneline |grep "Linux 2.6.32"
22763c5cf3690a681551162c15d34d935308c8d7 Linux 2.6.32
648f4e3e50c4793d9dbf9a09afa193631f76fa26 Linux 2.6.32-rc8
156171c71a0dc4bce12b4408bb1591f8fe32dc1a Linux 2.6.32-rc7
Write the common commit into the head:
$ echo 22763c5cf3690a681551162c15d34d935308c8d7 > .git/refs/heads/master
And fetch again:
$ git fetch git://oss.sgi.com/xfs/xfs.git master:master
>From git://oss.sgi.com/xfs/xfs
22763c5..44a743f master -> master
$
This works on both bare and non-bare repositories. It's far
faster than recloning everything....
Cheers,
Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
|