threads / discuss / 54395

Feature: checkout and merge

Subject: Feature: checkout and merge

## tl;dr

3 messages between Oct 12, 2020 and Oct 12, 2020.

replies: 2people: 3as markdown or json

Victor Porton· Oct 12, 2020, 11:05 UTC · lore

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.)
Konstantin Tokarev· Oct 12, 2020, 15:04 UTC · re: Victor Porton · lore

Re: Feature: checkout and merge

12.10.2020, 14:12, "Victor Porton" <porton@narod.ru>:
Show 15 quoted lines
> 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?

--  Regards, Konstantin

Junio C Hamano· Oct 12, 2020, 17:48 UTC · re: Konstantin Tokarev · lore

Re: Feature: checkout and merge

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.

← back to recent threads