RE: Default behavior of git pull
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Jul 14, 2021, 15:31 UTC
- Message-ID
- <60ef0352705ca_261120866@natae.notmuch>
- In-Reply-To
- <7a97ac78-f405-2dca-2998-f03637cc8255@gmail.com>
Hi Mathias,
I hadn't seen this mail.
Mathias Kunter wrote:
> Wouldn't it make sense if "git pull" would by default also pull the > branch with the same name from the remote, in case no upstream is > configured?
I agree.
In fact, back in 2014 I wrote a builtin called `git update` to fix all the problems with `git pull`. That command worked exactly as you suggest.
I recently sent a new proposal for `git update` [1] asking for feedback on how different arguments should be handled. Nobody has suggested anything.
For the next iteration I will implement what you suggested, in my opinion it makes sense.
Cheers.
[1] https://lore.kernel.org/git/20210705123209.1808663-1-felipe.contreras@gmail.com/
-- Felipe Contreras