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

Re: Feature: checkout and merge

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2020, 17:48 UTC
Message-ID
<xmqqo8l7pc7w.fsf@gitster.c.googlers.com>
In-Reply-To
<5293161602514983@mail.yandex.ru>
Konstantin Tokarev <annulen@yandex.ru> writes:
Show 18 quoted lines
> 12.10.2020, 14:12, "Victor Porton" <porton@narod.ru>:
>> It is a very often need to checkout a branch and them merge the branch
>> that was before the checkout. Moreover after this is very often needed
>> to push.
>>
>> So please add the flags to `checkout`:
>>
>> 1. to merge the old branch immediately after checkout
>>
>> 2. to push after checkout
>>
>> I repeatedly write:
>>
>> git checkout stable && git merge main && git push && git checkout main
>>
>> (I am not subscribed to this mailing list.)
>
> Why not make a shell script to do this?

Sounds like a very sensible suggestion. "merging and then pushing immediately after" without any validation step in between is not for everybody and being able to implement such a custom workflow is why we have these individual steps as discrete commands.

Thanks.
Previous: Konstantin Tokarev
Message 3 of 3 in “Feature: checkout and merge”
  1. Victor PortonOct 12, 2020
  2. Konstantin TokarevOct 12, 2020
  3. Junio C HamanoOct 12, 2020

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.