git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Peter Harris" <git@peter.is-a-geek.org>
To: "Peter Valdemar Mørch (Lists)" <4ux6as402@sneakemail.com>
Cc: git@vger.kernel.org
Subject: Re: Git (svn) merge - but ignore certain commits?
Date: Sat, 27 Dec 2008 19:17:25 -0500	[thread overview]
Message-ID: <eaa105840812271617n74406517x3335a05d224f5e0@mail.gmail.com> (raw)
In-Reply-To: <49562749.9060705@sneakemail.com>

On Sat, Dec 27, 2008 at 8:02 AM, "Peter Valdemar Mørch (Lists)" wrote:
>
> * And now the trick: "git merge" "gitnewbranch" back to master. But I want
> to avoid the "git revert" of the few commits that weren't ready yet.
>
> * "git svn dcommit" master to get the new functionality into svn trunk.
>
> How do I "git merge" all of "gitnewbranch" except the reverts?

"git rebase -i trunk" after you "git merge". Delete the lines that
contain the will-be-reverted commits and the revert commits. Actually,
skip the reverts in the first place to save time.

Normally I wouldn't suggest it, since it will throw away your merge,
but "git svn dcommit" does an implicit rebase anyway, so you will lose
nothing.

> Is there a way to "git merge gitnewbranch" excluding the reverts, just the
> "new functionality", so the log of master doesn't even mention the reverts
> and so "git svn rebase" and "git svn dcommit" work properly?

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?

> 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.

Peter Harris

  reply	other threads:[~2008-12-28  0:18 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 [this message]
2009-01-08 17:49   ` "Peter Valdemar Mørch (Lists)"
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=eaa105840812271617n74406517x3335a05d224f5e0@mail.gmail.com \
    --to=git@peter.is-a-geek.org \
    --cc=4ux6as402@sneakemail.com \
    --cc=git@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).