Re: User's mailing list? And multiple cherry pick

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David <wizzardx@...>
Cc: <git@...>
Date: Wednesday, June 4, 2008 - 4:50 am

On Wed, 4 June 2008, David wrote:

I think the simplest solution would be to mark old master, change it
to topic (merge or branch -f), and use interactive rebase.

  $ git checkout master
  $ git branch TMP
         
  o--o--O *master, TMP
         \
          o--o--X--X--X--X--o--o topic

where '*master' means that 'master' is current branch.

Then to rewind 'master' to 'topic' you can use either
  $ git merge topic 
which should fast-forward to 'topic', or use git-reset
  $ git reset --hard topic

  o--o--O TMP
         \
          o--o--X--X--X--X--o--o topic, *master

Then there is simply a matter of rebasing master interactively, picking 
commits marked X.

  $ git rebase --interactive TMP
  # pick commits marked X in above diagram, backup (save) both original
  # list of commits, and final list of commits.

It is now safe to delete 'TMP' branch

  $ git branch -d TMP

  o--o--O--X'--X'--X'--X' *master
         \
          o--o--X--X--X--X--o--o topic

Now, if all goes well it would be simply a matter of rebasing 'topic' on 
top of 'master'; git-rebase would skip commits that are already there.

If it is not the case, use interactive rebase again, this time picking 
commits marked 'o' (if you saved original series, and list of commits 
rebased, this should be fairly easy to find/do).
 

And here you are.

HTH
-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: User's mailing list? And multiple cherry pick, Stephan Beyer, (Wed Jun 4, 4:00 am)
Re: User's mailing list? And multiple cherry pick, Jakub Narebski, (Wed Jun 4, 3:39 am)
Re: User's mailing list? And multiple cherry pick, Miklos Vajna, (Wed Jun 4, 7:10 am)
Re: User's mailing list? And multiple cherry pick, Theodore Tso, (Wed Jun 4, 7:36 am)
Re: User's mailing list? And multiple cherry pick, Jakub Narebski, (Wed Jun 4, 4:50 am)
Re: User's mailing list? And multiple cherry pick, Jakub Narebski, (Wed Jun 4, 5:47 am)
Re: User's mailing list? And multiple cherry pick, Junio C Hamano, (Wed Jun 4, 2:58 am)
Re: User's mailing list? And multiple cherry pick, Johan Herland, (Wed Jun 4, 4:16 am)
Re: User's mailing list? And multiple cherry pick, Jakub Narebski, (Wed Jun 4, 4:05 am)
Re: User's mailing list? And multiple cherry pick, Wincent Colaiuta, (Wed Jun 4, 5:39 am)
Re: User's mailing list? And multiple cherry pick, Jakub Narebski, (Wed Jun 4, 7:09 am)
Re: User's mailing list? And multiple cherry pick, Wincent Colaiuta, (Wed Jun 4, 7:02 am)
Re: User's mailing list? And multiple cherry pick, Johan Herland, (Wed Jun 4, 4:23 am)