Created
September 4, 2019 13:55
-
-
Save lawrence79/f6a5610b6465dfcd4a5cf54ccbd2d5c2 to your computer and use it in GitHub Desktop.
git 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
git: | |
gcl='git clone' | |
ga='git add' | |
grm='git rm' | |
gap='git add -p' | |
gall='git add -A' | |
gf='git fetch --all --prune' | |
gft='git fetch --all --prune --tags' | |
gfv='git fetch --all --prune --verbose' | |
gftv='git fetch --all --prune --tags --verbose' | |
gus='git reset HEAD' | |
gpristine='git reset --hard && git clean -dfx' | |
gclean='git clean -fd' | |
gm="git merge' | |
gmv='git mv' | |
g='git' | |
get='git' | |
gs='git status' | |
gss='git status -s' | |
gsu='git submodule update --init --recursive' | |
gl='git pull' | |
glum='git pull upstream master' | |
gpr='git pull --rebase' | |
gpp='git pull && git push' | |
gup='git fetch && git rebase' | |
gp='git push' | |
gpo='git push origin' | |
gpu='git push --set-upstream' | |
gpuo='git push --set-upstream origin' | |
gpuoc='git push --set-upstream origin $(git symbolic-ref --short HEAD)' | |
gpom='git push origin master' | |
gr='git remote' | |
grv='git remote -v' | |
gra='git remote add' | |
gd='git diff' | |
gds='git diff --staged' | |
gdv='git diff -w "$@" | vim -R -' | |
gc='git commit -v' | |
gca='git commit -v -a' | |
gcm='git commit -v -m' | |
gcam="git commit -v -am' | |
gci='git commit --interactive' | |
gb='git branch' | |
gba='git branch -a' | |
gbt='git branch --track' | |
gbm='git branch -m' | |
gbd='git branch -d' | |
gbD='git branch -D' | |
gcount='git shortlog -sn' | |
gcp='git cherry-pick' | |
gcpx='git cherry-pick -x' | |
gco='git checkout' | |
gcom='git checkout master' | |
gcb='git checkout -b' | |
gcob='git checkout -b' | |
gct='git checkout --track' | |
gcpd='git checkout master; git pull; git branch -D' | |
gexport='git archive --format zip --output' | |
gdel='git branch -D' | |
gmu='git fetch origin -v; git fetch upstream -v; git merge upstream/master' | |
gll='git log --graph --pretty=oneline --abbrev-commit' | |
gg="git log --graph --pretty=format:'%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset' --abbrev-commit --date=relative' | |
ggs="gg --stat' | |
gsl="git shortlog -sn' | |
gwc="git whatchanged' | |
gt="git tag' | |
gta="git tag -a' | |
gtd="git tag -d' | |
gtl="git tag -l' | |
gpatch="git format-patch -1' | |
gnew="git log HEAD@{1}..HEAD@{0}' | |
gcaa="git commit -a --amend -C HEAD' | |
ggui="git gui' | |
gcsam="git commit -S -am' | |
gst="git stash' | |
gstb="git stash branch' | |
gstd="git stash drop' | |
gstl="git stash list' | |
gstp="git stash pop' | |
gh='cd "$(git rev-parse --show-toplevel)' | |
gu='git ls-files . --exclude-standard --others' | |
gtls="git tag -l | gsort -V' | |
gtls='git tag -l | sort -V' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment