Git development
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Michael Dressel <MichaelTiloDressel@t-online.de>
Cc: Alex Riesen <raa.lkml@gmail.com>, git@vger.kernel.org
Subject: Re: git merge --no-commit <branch>; does commit
Date: Sat, 15 Dec 2007 19:26:53 +0100	[thread overview]
Message-ID: <20071215182653.GB22485@atjola.homenet> (raw)
In-Reply-To: <alpine.LSU.0.99999.0712151905280.4341@castor.milkiway.cos>

On 2007.12.15 19:14:48 +0100, Michael Dressel wrote:
>
>
> On Fri, 14 Dec 2007, Alex Riesen wrote:
>
>> Michael Dressel, Thu, Dec 13, 2007 22:28:30 +0100:
>>> On Thu, 13 Dec 2007, Alex Riesen wrote:
>>>> On 13/12/2007, Michael Dressel wrote:
>>>>> git merge --no-commit <branch> does "create" a commit. At lesat the
>>>>> head and index are moved to the new commit fetched from <branch>. Maybe
>>>>> that is because git was able to do a fast forward?
>>>>
>>>> Yes. Because fast-forward is what it called: fast-forward.
>>>> It does not do any commits at all.
>>>>
>>>
>>> It looks like I misunderstood the meaning of --no-commit. I have to use
>>> --squash in this case.
>>>
>>
>> Maybe. Or maybe you misunderstood the meaning of --squash, which also
>> is not a merge.
>
> Since "git merge --squash <branch>" does a merge of <branch> into the 
> working tree why would you not call it a merge?

A "real" merge commit has at least two parents, and retains the
individual commits of each branch in the history. It just connects two
lines of history. --squash just takes all changes and produces a
single-parented commit, destroying the individual commits that
originally introduced the changes.

> Anyway that was what I wanted. Merging <branch> (a topic branch) into my 
> current branch (the main branch) but being able to create commits that are
> more suitable for keeping in the history of the current branch than the
> commits I created during developing on <branch>.
> Would you recommend a different way of doing this?

If you didn't publish your topic branch, use interactive rebasing to
re-order/edit your commits.

Björn

  reply	other threads:[~2007-12-15 18:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 21:01 git merge --no-commit <branch>; does commit Michael Dressel
2007-12-13 21:19 ` Alex Riesen
2007-12-13 21:23   ` Alex Riesen
2007-12-13 21:28   ` Michael Dressel
2007-12-14  7:49     ` Alex Riesen
2007-12-15 18:14       ` Michael Dressel
2007-12-15 18:26         ` Björn Steinbrink [this message]
2007-12-15 19:18         ` Jakub Narebski
2007-12-15 20:22           ` Michael Dressel
2007-12-15 20:57             ` Jakub Narebski
2007-12-15 21:15               ` Michael Dressel
2007-12-15 19:37         ` Alex Riesen
2007-12-15 20:33           ` Michael Dressel
2007-12-16 10:53             ` Alex Riesen

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=20071215182653.GB22485@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=MichaelTiloDressel@t-online.de \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.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