Skip to content

Instantly share code, notes, and snippets.

@youurayy
Created June 9, 2014 20:41
Show Gist options
  • Save youurayy/96562e15d2c9f4b0f2ba to your computer and use it in GitHub Desktop.
Save youurayy/96562e15d2c9f4b0f2ba to your computer and use it in GitHub Desktop.
Git Bash Alias Helpers
alias gitadd='git ls-files -z -o --exclude-standard | xargs -0 git add'
alias gitadde='git ls-files -o --exclude-standard'
alias gitrem='git ls-files -z -d --exclude-standard | xargs -0 git rm'
alias gitreme='git ls-files -d --exclude-standard'
alias gits='git status'
function gitcom() { git commit -a -m "${*:-update}" && git push; }
# do this manually after the very first gitcom(): git push -u origin master
alias gitrel='if [ -n "$(npm version patch)" ]; then git push && git push --tags; fi'
alias gitlog='git log --oneline --decorate --graph'
alias gitmerge='git stash && git merge origin/master && git stash pop'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment