Skip to content

Instantly share code, notes, and snippets.

@Ranjithkumar
Last active August 29, 2015 13:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Ranjithkumar/9527081 to your computer and use it in GitHub Desktop.
Save Ranjithkumar/9527081 to your computer and use it in GitHub Desktop.
Helpful git command aliases
Add these lines into ~/.gitconfig file.
---------------------------------------------------------------------
[alias]
st = status
sh = show
ft = fetch
ci = commit
cm = commit -m
br = branch
rb = branch -d
co = checkout
nb = checkout -b
df = diff
pl = pull --rebase
ps = push
lg = log -p
rv = revert
cp = cherry-pick
ecm = commit --amend
uns = reset HEAD
fps = push -u
rbc = rebase --continue
undo = reset --hard
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = green
changed = red
untracked = cyan
[format]
pretty = "Commit: %C(yellow)%H%nAuthor: %C(green)%aN <%aE>%nDate: (%C(red)%ar%Creset) %ai%nSubject: %s%n%n%b"
---------------------------------------------------------------------
For more information, check here
1) https://thomashunter.name/blog/git-colored-output-shortcut-commands-autocompletion-and-bash-prompt/
2) http://gitready.com/intermediate/2009/02/06/helpful-command-aliases.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment