From: "\"Peter Valdemar Mørch (Lists)\"" <4ux6as402@sneakemail.com>
To: "Peter Harris git-at-peter.is-a-geek.org |Lists|"
<xtslkck8t30t@sneakemail.com>,
git@vger.kernel.org
Subject: Re: Git (svn) merge - but ignore certain commits?
Date: Thu, 08 Jan 2009 18:49:22 +0100 [thread overview]
Message-ID: <49663CA2.90102@sneakemail.com> (raw)
In-Reply-To: <eaa105840812271617n74406517x3335a05d224f5e0@mail.gmail.com>
First, a well-overdue thanks to Peter for your post.
Peter Harris git-at-peter.is-a-geek.org |Lists| wrote:
> If your branch is so ugly that you want to toss many of the commits
> anyway, maybe "git merge --squash" is what you are looking for? Or
> maybe you want to "git rebase -i" before merging?
It isn't. The whole reason for the branch was that there were 4
"beta-level" commits on trunk/master along with a whole bunch of good
stuff. And we wanted to add a little more good stuff, exclude the beta
stuff and create a release.
>> How do I do this "properly"?
>
> Use many short-lived feature branches, not few long-lived generic
> "development" branches. Merge-and-delete is easier than herding
> reverts.
I don't understand this, I'm affraid. Our "newbranch" was very short
lived. 4 reverts and 5 commits.
What I ended up doing was to create two git branches off of svn
"newbranch": One with all the fixes but without the reverts, and one
with just the reverts. Do all the development on the one with the fixes,
and then "git merge" them to both master and "gitnewbranch", then one
with the reverts. And then git svn dcommit them both.
However *the* problem was with repeated merges: I later discovered a
problem on the branch and need to add a commit for it to both master and
newbranch/gitnewbranch. Aside from git cherry-pick (where I take care of
the repeated merge problem) I still haven't found a good solution.
I ended up using git cherry-pick, and diff and patch / git diff and git
apply. Sub-optimal. :-( But small commits! :-)
Peter
--
Peter Valdemar Mørch
http://www.morch.com
next prev parent reply other threads:[~2009-01-08 17:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-27 13:02 Git (svn) merge - but ignore certain commits? "Peter Valdemar Mørch (Lists)"
2008-12-28 0:17 ` Peter Harris
2009-01-08 17:49 ` "Peter Valdemar Mørch (Lists)" [this message]
2009-01-08 18:29 ` Peter Harris
2009-01-08 19:17 ` "Peter Valdemar Mørch (Lists)"
2009-01-08 20:00 ` Peter Harris
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=49663CA2.90102@sneakemail.com \
--to=4ux6as402@sneakemail.com \
--cc=git@vger.kernel.org \
--cc=xtslkck8t30t@sneakemail.com \
/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;
as well as URLs for NNTP newsgroup(s).