git pull --rebase - Today I learned
February 25, 2019
So I’m one of those developers who prefer rebasing instead of merging to keep a nice linear commits history.
Whenever I’ve got rejected on pushing branch to remote (eg. because someone meanwhile introduced new changes) I have been using first git fetch
followed by git rebase origin/the-branch
to put my changes on top of everything. Recently I discovered that there is easier way, it’s: git pull --rebase
.
In short it does excatcly what it’s done with two mentioned. So instead:
git fetch
git rebase origin/the-branch
I’m using:
git pull --rebase
Robert Kisiel - frontend developer blog
Piszę o JS i pracy frontend developera oraz o moich doświadczeniach z programowaniem.