Skip to content

Instantly share code, notes, and snippets.

@smmoosavi
Last active June 25, 2018 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smmoosavi/2a71d6fbd85dc06452c649325763f737 to your computer and use it in GitHub Desktop.
Save smmoosavi/2a71d6fbd85dc06452c649325763f737 to your computer and use it in GitHub Desktop.
my git alias
[alias]
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --date=relative
glg = !git lg --graph
tree = log --graph --decorate --pretty=oneline --abbrev-commit
tr = !LESS="-RFX" git tree
unstage = reset HEAD
last = log -1 HEAD
visual = !gitk
st = status
uncommit = reset --soft HEAD^
progress = diff --stat
pg = diff --shortstat
up = checkout
please = push --force-with-lease
# dsf = "!f() { [ -z \"$GIT_PREFIX\" ] || cd \"$GIT_PREFIX\" && git diff --color \"$@\" | diff-so-fancy | less --tabs=4 -RFX; }; f"
[core]
editor = vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment