Skip to content

Instantly share code, notes, and snippets.

@aboutandre
Last active April 20, 2018 11:35
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 aboutandre/7ccabd3cd4037d2c5956c7a86a41e0f3 to your computer and use it in GitHub Desktop.
Save aboutandre/7ccabd3cd4037d2c5956c7a86a41e0f3 to your computer and use it in GitHub Desktop.
Handy aliases for the .bash_profile
## Resets the .bash_profile; useful if you don't want to restart your Terminal window
alias sourceBash='source ~/.bash_profile'
## Some git shorcuts
alias commit='git commit -a'
alias gc='git checkout'
alias push='git pull && git push'
alias pull='git pull'
alias fetch='git fetch'
alias status='git status'
alias discardChangesInGit='git stash save --keep-index && git stash drop'
alias addAll='git add -A'
## Toggle all hidden files in Mac OS
alias showHidden='defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder'
alias hideHidden='defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder'
## Find all '.orig' files that are used in merge conflicts for all subfolders
alias findOrigFiles='find . -name "*.orig" -type f'
## Delete all '.orig' files
alias deleteOrigFiles='find . -name "*.orig" -type f -delete'
## Kill all Chrome processes
alias killChrome='killall -9 "Google Chrome"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment