Browse Source

git: Added even more Git hot shortcuts

master
Nick Plekhanov 9 years ago
parent
commit
f66875e29c
  1. 16
      shell/shell_aliases

16
shell/shell_aliases

@ -110,16 +110,20 @@ function git_list_branches() {
} }
# Git aliases # Git aliases
# More Git tips http://firstaidgit.io/
alias gss="git status -s" alias gss="git status -s"
alias gp="git push origin HEAD" alias gp="git push origin HEAD"
alias gpt="git push origin HEAD && git push --tags" alias gpt="git push origin HEAD && git push --tags"
alias wip="git commit -m'WIP' . && git push origin HEAD" alias wip="git commit -m'WIP' . && git push origin HEAD"
alias grok="ngrok start rem.jsbin-dev.com static.rem.jsbin-dev.com learn.rem.jsbin-dev.com" alias grok="ngrok start rem.jsbin-dev.com static.rem.jsbin-dev.com learn.rem.jsbin-dev.com"
alias gl='git log' alias gl='git log'
alias glp5='git log -5 --pretty --oneline' # view your last 5 latest commits each on their own line
alias glt='git log --all --graph --decorate --oneline --simplify-by-decoration' # pretty branch status
alias glsw='git log -S' # search the commit history for the word puppy and display matching commits (glsw [word])
alias gs='git status' alias gs='git status'
alias gd='git diff' alias gd='git diff'
alias gm='git commit -m' alias gm='git commit -m'
alias gma='git commit -am' alias gam='git commit -am'
alias gb='git branch' alias gb='git branch'
alias gc='git checkout' alias gc='git checkout'
alias gra='git remote add' alias gra='git remote add'
@ -128,7 +132,15 @@ alias gbt=git_list_branches
alias gpu='git pull origin HEAD --prune' alias gpu='git pull origin HEAD --prune'
alias gcl='git clone' alias gcl='git clone'
alias gta='git tag -a -m' alias gta='git tag -a -m'
alias gf='git reflog' alias gf='git reflog' # allows you to see every step you have made with git allowing you to retract and reinstate your steps
alias gap='git add -p' # step through each change, or hunk
alias gsl='git shortlog -sn' # quickly get a list of contributors and see how many commits each person has
alias gws='git diff --shortstat "@{0 day ago}"' # how many lines of code you have written today
alias ggmp='git checkout -' # jump back to to your last branch
alias gst='git stash' # stash git changes and put them into your list
alias gdtp='git stash pop' # bring back your changes, but it removes them from your stash
alias gchp='git cherry-pick' # cherry pick the committed code in your own branch (gchp [hash])
alias gcln='git clean -xfd' # remove untracked files
# Undo a `git push` # Undo a `git push`
alias undopush="git push -f origin HEAD^:master" alias undopush="git push -f origin HEAD^:master"

Loading…
Cancel
Save