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

Re: Preserving branches after merging on ancestor

From
EREric Raible <raible@gmail.com>
Date
Nov 5, 2009, 18:38 UTC
Message-ID
<loom.20091105T193641-910@post.gmane.org>
In-Reply-To
<26217077.post@talk.nabble.com>
Richard Lee <richard <at> webdezign.co.uk> writes:
Show 14 quoted lines
> So I tried using branches for features today. Most of the time I'm the only
> person working on a project. So when I've finished working on a feature
> branch and ready to merge it back into the master branch, the master head IS
> the common ancestor of the two branches. As shown below
> 
> * b6d75f1 [feature] stuff on feature branch
> * 43dba08 stuff on feature branch
> * ab7efdd [master] init
> 
> When I merge the graph looks likes this:
> 
> * b6d75f1 [master] [feature] stuff on feature branch
> * 43dba08 stuff on feature branch
> * ab7efdd init

You're getting a so-called "fast-forward" merge, which is the default. Turn it off with:

git merge --no-ff
Previous: Richard LeeNext: Jonathan Nieder
Message 2 of 12 in “Preserving branches after merging on ancestor”
  1. Richard LeeNov 5, 2009
  2. Eric RaibleNov 5, 2009
  3. Jonathan NiederNov 5, 2009
  4. Björn SteinbrinkNov 5, 2009
  5. Jonathan NiederNov 6, 2009
  6. Björn SteinbrinkNov 6, 2009
  7. Jonathan NiederNov 6, 2009
  8. rhleeNov 6, 2009
  9. Jonathan NiederNov 6, 2009
  10. Dilip MNov 7, 2009
  11. Björn SteinbrinkNov 7, 2009
  12. Björn SteinbrinkNov 7, 2009

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.