HÄll en ren, linjÀr historik.
Idealiskt lÀmpad för högpresterande team och individuella funktionsgrenar. HÄller historiken linjÀr och ren.
$ git checkout -b jz-my-branch
# make my changes
$ git push origin jz-my-branch
# create a Merge Request
# three days go by and now my branch is out of sync with master
$ git fetch origin master
$ git rebase origin/master
$ git push --force origin jz-my-branch
Obs: Genom att anvÀnda rebase behöver du bara lösa sammanslagningskonflikter för nyare commits. Det ger en bÀttre upplevelse.
# Clean up your branch (warning will delete everything not matching remote)
git fetch --prune origin
git reset --hard origin/master
git clean -f -d
# Setting your branch to exactly match the remote branch:
git fetch origin
git reset --hard origin/master