Skip to content

Instantly share code, notes, and snippets.

@andkirby
Last active July 17, 2017 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andkirby/a7bc09f98a2d9bfd2b029b6caf5776ab to your computer and use it in GitHub Desktop.
Save andkirby/a7bc09f98a2d9bfd2b029b6caf5776ab to your computer and use it in GitHub Desktop.
Short aliases for GOT
# ---- GIT ----
#alias git="/d/prog/git/bin/git.exe"
# Git status
alias gg="git status -uno"
# Re-add files (refresh cache)
#alias gau='git status -s | cut -c4- | xargs git add'
alias gau="git diff --name-only --cached | xargs -I '{}' realpath --relative-to=. $(git rev-parse --show-toplevel)/'{}'"
# Re-add files (refresh cache) and commit
alias gc="gau && git commit -m"
alias gl='git log -3'
alias glast="git reset --soft HEAD^ && git log -1"
# git add for tracked files
alias ga='git add -u'
alias gch='git cherry-pick'
alias gb='git branch'
alias gp='git push'
alias gpt='git push && git push --tags'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment