Skip to content

Instantly share code, notes, and snippets.

@MrMovl
Created September 3, 2018 07:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrMovl/b8d3f390e3c43e911bff19f45b11e32c to your computer and use it in GitHub Desktop.
Save MrMovl/b8d3f390e3c43e911bff19f45b11e32c to your computer and use it in GitHub Desktop.
alias gdno="git diff --name-only"
alias gd="git diff"
alias gcm="git commit -m"
alias gaa="git add -A"
alias gca="git commit --amend --no-edit"
alias gcaa="git add --all && git commit --amend --no-edit"
alias gnope="git checkout ."
alias gwait="git reset HEAD"
alias gundo="git reset --soft HEAD^"
alias gl="git log --graph --pretty='\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit"
alias gco="git checkout"
alias gps="git push"
alias gpsf="git push --force-with-lease"
alias gpl="git pull --rebase"
alias grb="git rebase"
grn() { git rebase -i HEAD~"$1"; }
grbic() { git rebase -i "$1" ; }
alias grba="git rebase --abort"
alias grbc="git rebase --continue"
@MateLord
Copy link

MateLord commented Sep 3, 2018

Lack of gcam ;)
alias gcam="git commit -a -m"

@carlosrogue
Copy link

I changed the quoting in gl because it did not work (ZSH):

git log --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

But, this would be my gl:

alias gl="git log --oneline --graph"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment