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

Re: Merge *to* branch instead of merge *from* branch?

From
Avery Pennarun <apenwarr@gmail.com>
Date
Apr 26, 2008, 23:17 UTC
Message-ID
<32541b130804261617y1fb2a8d9jf8fc6f58ca07b44f@mail.gmail.com>
In-Reply-To
<alpine.DEB.1.00.0804270037220.1149@perkele.intern.softwolves.pp.se>
On 4/26/08, Peter Karlsson <peter@softwolves.pp.se> wrote:
>  Is there any way of not having to do the "git checkout master" first?
> Basically I want a flag to merge or checkout saying that I want to merge my
> branch into the branch I'm switching to. I can't seem to find any such flag.
How about this?

git merge master git branch -D master git branch master HEAD

In other words, just make a copy of your current branch after merging and call it the new 'master'. That's all fast forwarding would do anyhow.

Have fun,
Avery
Previous: Peter KarlssonNext: Kelvie Wong
Message 2 of 3 in “Merge *to* branch instead of merge *from* branch?”
  1. Peter KarlssonApr 26, 2008
  2. Avery PennarunApr 26, 2008
  3. Kelvie WongApr 27, 2008

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.