From: Matthew Wilcox <matthew@wil.cx>
To: parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] Git tree rebased
Date: Tue, 31 Oct 2006 09:05:16 -0700 [thread overview]
Message-ID: <20061031160516.GC26964@parisc-linux.org> (raw)
In-Reply-To: <20061031150001.GB26964@parisc-linux.org>
On Tue, Oct 31, 2006 at 08:00:01AM -0700, Matthew Wilcox wrote:
> If your remotes file currently has a line in it like:
>
> Pull: refs/heads/master:refs/heads/origin
>
> then you'll want to add the '+' at the beginning:
>
> Pull: +refs/heads/master:refs/heads/origin
>
> otherwise git will refuse to update. With the +, it will complain, but
> do it anyway.
As we've now learned, it's not that easy. The problem is that all your
local repositories have a divergent branch of history from the one now
in the shared repo's master branch. Here's a recovery guide. Sorry for
all the inconvenience.
First, be sure your tree is clean before you pull. ie git-diff returns
nothing. Otherwise you'll be in even more pain than the rest of this.
Now, if you have no commits outstanding vs upstream
(git-log origin..master returns nothing), life is fairly easy.
After you put in the + above, you need to git-pull, then
git-checkout origin
git-branch -D master
git-checkout -b master
Now you can work as before.
If you have commits in your master branch, then we need to move them
over to the new origin branch.
git-fetch origin devel-2006-10-31:devel-2006-10-31
git-fetch origin
git-checkout -b new-master origin
for i in `git-rev-list devel-2006-10-31..master |tac`; do if ! git-cherry-pick -r $i; then sh; fi; done
# assuming the above goes OK
git-branch -D master
git-checkout -b master
git-branch -d new-master
Any more problems, please let me know. I hadn't thought through all the
consequences of rebasing the current master branch.
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
next prev parent reply other threads:[~2006-10-31 16:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-31 15:00 [parisc-linux] Git tree rebased Matthew Wilcox
2006-10-31 16:05 ` Matthew Wilcox [this message]
[not found] ` <45487F41.4020509@scarlet.be>
[not found] ` <20061101124125.GB11399@parisc-linux.org>
2006-11-01 14:42 ` Joel Soete
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061031160516.GC26964@parisc-linux.org \
--to=matthew@wil.cx \
--cc=parisc-linux@parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox