Created
February 17, 2014 16:19
-
-
Save anonymous/9053693 to your computer and use it in GitHub Desktop.
Which git commands do you use most?
This file contains 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
history -w /dev/stdout | grep -o "^git [a-Z]*\( -\{1,2\}\([a-Z]\)*\)*" | sort | uniq -c | sort -rg |
romankierzkowski
commented
Feb 17, 2014
This stats may be wrong, I'm sure that 'status' has more use than 'remote', but in average is true ;)
206 git cbissue (alias: commit -m ...)
88 git commit -m
80 git add
49 git bissue (alias: checkout -b ...)
39 git diff --word-diff
29 git checkout
28 git remote
10 git status -s
I am getting an error:
$ history | grep -o "^git [a-Z]*\( -\{1,2\}\([a-Z]\)*\)*"
grep: Invalid range end
$ grep --version
grep (GNU grep) 2.16
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
On Mac:
history -w /dev/stdout | grep -o -e "^git [a-zA-Z0-9]( -{1,2}([a-zA-Z0-9]))*" | sort | uniq -c | sort -rg
Looks like my aliases are paying off:
736 git st (status)
183 git sw (checkout)
110 git ca (commit -va)
102 git g (!f() { if [ \"`uname -s`\" = 'Darwin' ]; then (gitx $@ &>/dev/null &); elif [ -n \"$DISPLAY\" ]; then (gitg $@ &>/dev/null &); else tig $@; fi; }; f)
79 git di (diff --word-diff)
78 git pu (-c push.default=simple push -v --progress
68 git pua (-c push.default=matching push -v --progress)
57 git ci (commit -v)
51 git stp (stash pop)
50 git up (pull -v --progress)
49 git ldiff (log -p --word-diff)
44 git pub (!f() { local target=$1; shift; git push . HEAD:$target $@; }; f)
41 git merge
39 git sts (stash save)
36 git all (add -A)
32 git rm
28 git help
24 git co (checkout)
23 git rup (remote update)
21 git amend (commit -v --amend)
19 git wtf (see http://git-wt-commit.rubyforge.org/)
18 git ls (branch -av)
17 git l (log --all --graph --pretty=format:\"%C(yellow)[%h]%Creset %C(cyan)%an:%Creset %C(white)%s%Creset%C(green)%d%Creset %C(black bold)%ar%Creset\")
17 git ff (merge --ff-only HEAD@{u})
14 git push
14 git branch -d
13 git branch -rd
12 git tag
11 git mergetool
10 git rm -r
10 git reset --hard
8 git show
8 git mv
8 git ldiff --
5 git revert
5 git reset -h
5 git r
5 git clean -f -d
5 git clean -f
5 git checkout --force
4 git sw -b
4 git poof
3 git unstage
3 git pu -u
2 git s
2 git r -v
2 git remote
2 git merge --abort
2 git diff
2 git cherry
2 git add -p
1 git wt
1 git t
1 git stl
1 git stage
1 git rm -rf
1 git rev
1 git clone
1 git checkout -h
1 git checkout -f
1 git checkout
1 git ca --no
1 git add
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment