All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Marshall <christopher.marshall@merchantlink.com>
To: git@vger.kernel.org
Subject: Re: merging individual files
Date: Fri, 14 Aug 2009 16:14:34 +0000 (UTC)	[thread overview]
Message-ID: <loom.20090814T160738-200@post.gmane.org> (raw)
In-Reply-To: 4A858B3B.3000208@drmicha.warpmail.net

Michael J Gruber <git <at> drmicha.warpmail.net> writes:
> > If you're on br1, I would:
> > 
> > git rebase -i X^
> > # change "pick" to "edit" in front of X in the list you get
> > git checkout X^ -- f3 f4 f5
> > git commit --amend
> > git checkout X -- f3 f4 f5
> > git commit
> 
> followed by
> 
> git rebase --continue
> 
> of course ;)
> 
> > 
> > For the 2nd commit, using the -c option may be beneficial.
> > 
> > Cheers,
> > Michael
> > 
> 
> 

Michael:

Thanks so much for your help, this is a lot of fun!

It occurs to me that another way (that doesn't use rebase) would be this:
git branch -m br1 br1-old
git checkout br1-old
git reset HEAD~
git checkout -b br1
git add f1
git commit -m "f1"
git add f2 f3
git commit -m "f2"
git branch -d br1-old (history eraser button ;-)

git checkout master
git merge br1~ (which now only pulls f1's changes)
(work for a while)
git merge br1 (which now pulls f2 and f3).

I like this sequence because it's so explicit about what's going on.

Are there any conceptual problems going this route that I am missing that might
screw up history?

Chris Marshall

      reply	other threads:[~2009-08-14 16:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-13 20:16 merging individual files Chris Marshall
2009-08-14  7:55 ` Michael J Gruber
2009-08-14 14:31   ` Chris Marshall
2009-08-14 15:28     ` Michael J Gruber
2009-08-14 16:05       ` Michael J Gruber
2009-08-14 16:14         ` Chris Marshall [this message]

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=loom.20090814T160738-200@post.gmane.org \
    --to=christopher.marshall@merchantlink.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 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.