Git 

Merge and Rebase

Git merge : merge a feature branch

Git rebase : fetch modifications
(from master or from remote)

Git rebase -i : clean up our history

Rebase on pull

git config --global pull.rebase preserve
  • alias.ci=commit
  • alias.st=status
  • alias.co=checkout
  • alias.fp=push -f
  • alias.m=checkout master
  • alias.p=pull
  • alias.cb=checkout -b
  • alias.mnf=merge --no-ff

Aliases

  • alias.lg=log --graph --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ar)%Creset'

Aliases

Aliases

  • alias.tidy=rebase -i @{upstream}..

  • alias.oops=commit --amend --no-edit

Git rerere

git config --global rerere.enabled true

Git merge and rebase

By ereold

Git merge and rebase

  • 1,896