Skip to content

Instantly share code, notes, and snippets.

@sporsh
Last active October 12, 2015 01:47
Show Gist options
  • Save sporsh/3952254 to your computer and use it in GitHub Desktop.
Save sporsh/3952254 to your computer and use it in GitHub Desktop.
git changes - Alias to get a quick overview of local and remote changes in current branch
[alias]
ci = commit
lg = log --abbrev-commit --format='%C(yellow)%h %Cblue%aN %Cgreen%ar %Creset%s'
co = checkout
st = status
loglocal = log --abbrev-commit --format='%Cgreen* %C(yellow)%h %Cblue%aN %Cgreen%ar %Creset%s' FETCH_HEAD..
logremote = "!f() { git fetch&&\
git log --abbrev-commit --format='%Cred* %C(yellow)%h %Cblue%aN %Cgreen%ar %Creset%s' ..FETCH_HEAD;\
}; f"
changes = "!f() { echo 'REMOTE CHANGES:\n---------------';\
git logremote;\
echo 'YOUR CHANGES:\n-------------';\
git loglocal;\
}; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment