Skip to content

Instantly share code, notes, and snippets.

@nitish6174
Last active April 11, 2022 05: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 nitish6174/01c87ea5c5e0e376302a1713b0426e25 to your computer and use it in GitHub Desktop.
Save nitish6174/01c87ea5c5e0e376302a1713b0426e25 to your computer and use it in GitHub Desktop.
Git aliases
[alias]
s = status
a = add
d = diff
dc = diff --cached
dd = difftool --tool=vimdiff -y
c = commit
ps = push
pl = pull
co = checkout
b = branch
cp = cherry-pick
l = log --oneline
l1 = log --graph --abbrev-commit --decorate --format=format:'%C(red bold)%h%C(reset) - %C(green)(%ar)%C(reset) %C(bold white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
l2 = log --graph --abbrev-commit --decorate --format=format:'%C(red bold)%h%C(reset) - %C(cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%C(bold white)%s%C(reset) %C(dim white)- %an%C(reset)'
g1 = log --graph --abbrev-commit --decorate --format=format:'%C(red bold)%h%C(reset) - %C(green)(%ar)%C(reset) %C(bold white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
g2 = log --graph --abbrev-commit --decorate --format=format:'%C(red bold)%h%C(reset) - %C(cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%C(bold white)%s%C(reset) %C(dim white)- %an%C(reset)'
g1m = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) - %C(green)(%ar)%C(reset) %C(bold white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all --author=Nitish
g2m = log --graph --abbrev-commit --decorate --format=format:'%C(red bold)%h%C(reset) - %C(cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%C(bold white)%s%C(reset) %C(dim white)- %an%C(reset)' --all --author=Nitish
[user]
name = Nitish Garg
email = nitish.garg.6174@gmail.com
[core]
autocrlf = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment