5 ms·
Never use pull, always use fetch. You shouldn't merge changes into your remote tracking branch, it causes nothing but problems.
by linuxftw 6y ago
Never use pull, always use fetch. You shouldn't merge changes into your remote tracking branch, it causes nothing but problems.
- samwestdev 6y agoExplain
- simiones 6y agoYou need to use either merge or rebase, or git won't allow you to push. Also, pull doesn't modify your remote tracking branch (origin/branch) - fetch does that. I do agree that usually, when you have a local branch dedicated to a particular remote tracking branch, it's not a good idea to merge the remote into your local branch - it's generally much better to rebase your local branch onto the remote tracking branch (pull -r).
- Seb-C 6y agoI was going to negatively answer your comment until I remembered that I have had [pull]rebase=true in my config for almost 10 years, so it have always been the "normal behaviour" to me. I never looked back to this. So I agree with you, the default pull behaviour that pollutes the branch with useless merge commits is plain stupid.