Last active
August 29, 2015 13:57
-
-
Save Ranjithkumar/9527081 to your computer and use it in GitHub Desktop.
Helpful git command aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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