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 commit history.
Whenever I got rejected on pushing a branch to remote (e.g. 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 an easier way, it’s: git pull --rebase.
In short it does exactly what is done with the two mentioned. So instead of:
git fetch
git rebase origin/the-branchI’m using:
git pull --rebaseRobert Kisiel - frontend developer blog
Piszę o JS i pracy frontend developera oraz o moich doświadczeniach z programowaniem.