* How to merge into my working copy?
@ 2009-11-06 14:53 Patrick Doyle
2009-11-06 14:59 ` Bruce Stephens
2009-11-06 17:53 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: Patrick Doyle @ 2009-11-06 14:53 UTC (permalink / raw)
To: git
I would like to pull a set of changes from a branch back into the
working copy of my current branch without affecting the index. I
can't figure out the right combination of --commit, --no-commit, -ff,
-no-ff, --log, --no-log, --squash, --no-squash, etc... options to use
with git-merge.
Basically, I created a branch off my mainline branch a few days ago.
Made some commits on that branch. Then went back to my mainline
branch, made a few commits there, and now I would like to make my
working copy look like a merge of its current state with the changes
from the branch, minus any associated commits.
I probably should have just used git-stash to tuck those changes away,
but I didn't.
--wpd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to merge into my working copy?
2009-11-06 14:53 How to merge into my working copy? Patrick Doyle
@ 2009-11-06 14:59 ` Bruce Stephens
2009-11-06 17:53 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Bruce Stephens @ 2009-11-06 14:59 UTC (permalink / raw)
To: Patrick Doyle; +Cc: git
Patrick Doyle <wpdster@gmail.com> writes:
[...]
> Basically, I created a branch off my mainline branch a few days ago.
> Made some commits on that branch. Then went back to my mainline
> branch, made a few commits there, and now I would like to make my
> working copy look like a merge of its current state with the changes
> from the branch, minus any associated commits.
>
> I probably should have just used git-stash to tuck those changes away,
> but I didn't.
Rather than spending time worrying about optimal ways to do this,
wouldn't it work just to do merge (to get the right tree) followed by
rebase -i to get the commits in the way you want (removing the merge,
anyway)?
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to merge into my working copy?
2009-11-06 14:53 How to merge into my working copy? Patrick Doyle
2009-11-06 14:59 ` Bruce Stephens
@ 2009-11-06 17:53 ` Junio C Hamano
2009-11-06 18:15 ` Patrick Doyle
1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2009-11-06 17:53 UTC (permalink / raw)
To: Patrick Doyle; +Cc: git
Patrick Doyle <wpdster@gmail.com> writes:
> I would like to pull a set of changes from a branch back into the
> working copy of my current branch without affecting the index. I
> can't figure out the right combination of --commit, --no-commit, -ff,
> -no-ff, --log, --no-log, --squash, --no-squash, etc... options to use
> with git-merge.
>
> Basically, I created a branch off my mainline branch a few days ago.
> Made some commits on that branch. Then went back to my mainline
> branch, made a few commits there, and now I would like to make my
> working copy look like a merge of its current state with the changes
> from the branch, minus any associated commits.
If you do not have to have your extra "without affecting the index"
constraint (which I do not see a sensible reason to want to, by the way),
you can "merge --no-commit that_branch", I think.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to merge into my working copy?
2009-11-06 17:53 ` Junio C Hamano
@ 2009-11-06 18:15 ` Patrick Doyle
0 siblings, 0 replies; 4+ messages in thread
From: Patrick Doyle @ 2009-11-06 18:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Fri, Nov 6, 2009 at 12:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
> If you do not have to have your extra "without affecting the index"
> constraint (which I do not see a sensible reason to want to, by the way),
> you can "merge --no-commit that_branch", I think.
>
After bouncing this around a couple of times with Bruce Stephens, and
only now noticing that I hit "Reply" instead of "Reply-All"... sigh),
I realized that what I wanted was:
$ git merge --squash that_branch
$ git reset
I only wanted to affect my working copy, editing and adding things to
the index (which I think of as "staging area for my next commit") as I
was ready.
--wpd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-06 18:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-06 14:53 How to merge into my working copy? Patrick Doyle
2009-11-06 14:59 ` Bruce Stephens
2009-11-06 17:53 ` Junio C Hamano
2009-11-06 18:15 ` Patrick Doyle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox