5 ms·
"git pull" doesn't merge the "latest changes"; A pull is fetch+merge, and you can fetch from any repository, so a pull request is saying "please fetch commits f
by chousuke 5y ago
"git pull" doesn't merge the "latest changes"; A pull is fetch+merge, and you can fetch from any repository, so a pull request is saying "please fetch commits from my repository and merge them".
I think git made a mistake in making pull the default (fetch+explicit merge is better) but "pull request" is correct terminology.
- pletnes 5y agoIs pull the default? What does that even mean? I certainly tend to fetch, checkout origin/master, create a feature branch, push, then merge in github’s web interface. I «never» pull and I don’t have to change any settings.
- chousuke 5y agopull is "default" in that everyone gets taught to use it and you have to unlearn that once you realize it's not what you want most of the time.
- onetom 5y agothis statement surpises me, because `git pull --rebase` is practically my most frequently used operation, besides commit, push and changing branches. intellij even comes with the concept of update, which is either a `pull` or a `pull --rebase` it asks u once which of those should be the default behaviour, then all i do is cmd-t to updaTe (aka git pull --rebase) my current branch, then push my commits, after a potential 3-way merge, which intellij has the easiest-to-learn interface for, imho.
- ziml77 5y agoYou can make --rebase the default: git config --global pull.rebase true I have this set because it's never intentional when I do a pull to end up with an ugly merge commit
- chousuke 5y ago"git pull --rebase" is not "git pull", it's a different operation. I agree it would be a better default to rebase instead of merge though.
- deleted 5y ago[deleted]