All of lore.kernel.org
 help / color / mirror / Atom feed
From: tom fogal <tfogal@alumni.unh.edu>
To: git@vger.kernel.org
Subject: More on svn workflows
Date: Sat, 23 Jan 2010 15:57:17 -0700	[thread overview]
Message-ID: <auto-000021753828@sci.utah.edu> (raw)

I have recently (1, 1.5 months ago?) started using a workflow similar
to the one described here:

  http://www.spinics.net/lists/git/msg109896.html

(short summary: work in private branch, "merge --no-ff" into svn
upstream, "merge" from svn upstream.)

... with the minor modification that I use "--squash" instead of
"--no-ff".  If I use --no-ff, I end up with a lot of "merge from master
into <myprivatebranch>" commits on my master branch before I dcommit.
It also merges in a lot of history that I feel like I shouldn't see--
that is, both the svn commit and my private branch's commit, and I'm
worried about what might happen if I dcommit that.  That said, I might
be in that situation because I used --squash 3 or 4 times before I
realized I was misremembering that thread.

Anyway, my current issue is that whenever I do a `git commit' after a
"merge --squash", I end up with *everything* I've done since starting
the branch in the commit message.  To be more explicit, say I've got
this setup:

  o--o--o                 master
         \
          o--o--o         private branch started

then I'll update master and merge it into my private branch:

  o--o--o--------D          master
         \        \
          A--B--C--o        private

test, merge --squash private into master and dcommit:

  o--o--o--------D---A'--B'--C'--D''     master
         \        \ /
          A--B--C--D'                    private

something happens upstream:

  o--o--o--------D---A'--B'--C'--D''--E        master
         \        \ /
          A--B--C--D'                          private

which I merge to private:

  o--o--o--------D---A'--B'--C'--D''--E        master
         \        \ /                  \
          A--B--C--D'-------------------E'     private

I do some work, commit F, and decide I want to push it upstream, so
I'll do a merge --squash into master:

  o--o--o--------D---A'--B'--C'--D''--E-------F'   master
         \        \ /                  \     /
          A--B--C--D'-------------------E'--F      private

Now the issue is when I `git commit' the merge from private, git says
this is a "squashed commit of the following", and lists the commit
messages for A, B, C, D, D', D'' E, E' and F.  I really just want the
commit message for "F" in this case -- every other message is already
on the trunk, in a different commit.  This wasn't such a big issue
at first: git picked up a few extra commits, so I hacked out the log
messages before committing them on master.  After doing this for a
while though, there's something like 100 commits I have to wade through
while doing this, and it's only going to get worse and worse.

On the other hand, I'm sure there's some option I could use so "git
commit" would startup with an empty commit message in this case, but I
do *want* the partial history, as it helps me design the commit message
that I want the svn trunk's history to have.

What am I doing wrong?

-tom

                 reply	other threads:[~2010-01-23 23:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=auto-000021753828@sci.utah.edu \
    --to=tfogal@alumni.unh.edu \
    --cc=git@vger.kernel.org \
    --cc=tfogal@sci.utah.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.