git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Is there a way to add a default `--squash` flag for all merges into a head?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 8, 2011, 19:28 UTC
Message-ID
<7vr5ahe7jc.fsf@alter.siamese.dyndns.org>
In-Reply-To
<b98e837f-a0ae-4061-aa09-b4d30e3b0522@b13g2000prf.googlegroups.com>
Dun Peal <dunpealer@gmail.com> writes:
> Sigh. You're right, what a silly man I am!!!
>
> I assume there's no way to do what I want, except maybe encourage
> everyone to use an alias for `git merge` that includes the flag.

I have a strong suspicion that it is not really what you want to always use --squash merge, and everybody forced (or "encouraged") by you to do so would hate you in the end.

The solution to whatever problem you are trying to solve should not be to discard one of the most valuable information git keeps track of to avoid the CVS/(old)SVN mess when performing repeated merges with a branch.

I also suspect that you might be delighted by "log --first-parent -m".
Previous: Dun PealNext: Dun Peal
Message 4 of 9 in “Is there a way to add a default `--squash` flag for all merges into a head?”
  1. Dun PealMar 7, 2011
  2. Andreas SchwabMar 7, 2011
  3. Dun PealMar 7, 2011
  4. Junio C HamanoMar 8, 2011
  5. Dun PealMar 9, 2011
  6. Junio C HamanoMar 9, 2011
  7. Dun PealMar 9, 2011
  8. Jay SoffianMar 8, 2011
  9. Dun PealMar 10, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.