Linux PARISC architecture development
 help / color / mirror / Atom feed
* [parisc-linux] On keeping history clean
@ 2006-09-12 12:46 Matthew Wilcox
  2006-09-12 15:19 ` [parisc-linux] Zen and the Art of Merge Maintenance Kyle McMartin
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2006-09-12 12:46 UTC (permalink / raw)
  To: parisc-linux


So you've done some work on the parisc git tree, you've been committing
stuff as you go, and now it's time to merge back.  Unfortunately, other
people have also been working on the tree, and so your history is full
of merges that you'd like to get rid of.  Here's how to do it.

I have a pretty simple situation here; I did a couple of commits, then I
pulled the recent 2.6.18-rc6 merge.

So what would I push?

$ git-log origin..master
commit 59c4c2b0510ff0b8acd904c0cbc52a7cba788baf
Merge: 302eeed... df0e7cd...
Author: Matthew Wilcox <matthew@wil.cx>
Date:   Tue Sep 12 05:21:19 2006 -0600

    Merge branch 'master' of /var/git/linux-2.6

commit 302eeedbcb19477ebaee30fe934f4b82cb44fbba
Author: Matthew Wilcox <matthew@wil.cx>
Date:   Tue Sep 12 05:19:15 2006 -0600

    Remove some obsolete comments and I checked that Reo is similar to Ike.

commit 7f51f71822a4019136d3297ba5b50ff9fca8e9f3
Author: Matthew Wilcox <matthew@wil.cx>
Date:   Tue Sep 12 05:17:59 2006 -0600

    Hardware found in the rp8400

The merge commit has to be eliminated.  So create a new branch:

$ git-branch merge origin
$ git-checkout merge
$ git-cherry-pick -e 7f51f71822a4019136d3297ba5b50ff9fca8e9f3
$ git-cherry-pick -e 302eeedbcb19477ebaee30fe934f4b82cb44fbba

I use the -e so I can get rid of the message appended by cherry-pick.

Now let's pretend the original branch never happened.

$ git-branch -D master
$ git-checkout -b master
$ git-branch -d merge

And finally, push to palinux.

$ git-push

Voila, no more merge commits.  I'm sure someone with more git expertise
can tell me a better way of doing this ... but it works.
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-12 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-12 12:46 [parisc-linux] On keeping history clean Matthew Wilcox
2006-09-12 15:19 ` [parisc-linux] Zen and the Art of Merge Maintenance Kyle McMartin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox