Created
October 20, 2017 14:01
-
-
Save sergio-fry/7d07dfb63948e698107e01fe88e82961 to your computer and use it in GitHub Desktop.
Bash aliases. git
This file contains 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
alias ga='git add' | |
alias gl='git log' | |
alias gb='git branch' | |
alias gco='git checkout' | |
alias gd='git diff' | |
alias s='gs' | |
alias a='ga' | |
alias c='gc' | |
# Usage: | |
# gc 'bug is fixed' # non-interactive mode | |
# gc # interactive mode | |
# Commit message: bug is fixed | |
# | |
function gc { | |
local commitmessage | |
if [ "" = "$1" ]; then | |
echo -n 'Commit message: ' | |
commitmessage="$(ruby -e "puts gets")" | |
git commit -m "$commitmessage" | |
else | |
git commit -m "$1" | |
fi | |
} | |
alias be='bundle exec' | |
alias gsc='git add *; git commit -m "WIP: work in progress"' | |
alias gcp='gsc ; git put' | |
alias gip='gcp' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment