Skip to content

Instantly share code, notes, and snippets.

@CodisRedding
Created January 20, 2016 14:54
Show Gist options
  • Save CodisRedding/63fb75cce557319d6401 to your computer and use it in GitHub Desktop.
Save CodisRedding/63fb75cce557319d6401 to your computer and use it in GitHub Desktop.
# Use `hub` as our git wrapper:
# http://defunkt.github.com/hub/
hub_path=$(which hub)
if (( $+commands[hub] ))
then
alias git=$hub_path
fi
# The rest of my fun git aliases
alias gpp='git pull --prune'
alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
alias gp='git push origin HEAD'
alias gd='git diff'
alias gc='git commit'
alias gca='git commit -a'
alias gco='git checkout'
alias gcb='git copy-branch-name'
alias gb='git branch'
alias gs='git status -sb' # upgrade your git if -sb breaks for you. it's fun.
alias gpt='git push --tags'
alias ga='git add'
# Gitflow
#
# [Features]
# > Develop new features for upcoming releases
# > Typically exist in developers repos only
alias gfi='git flow init' # <name>
alias gffs='git flow feature start' # <name>
alias gfff='git flow feature finish' # <name>
alias gffp='git flow feature publish' # <name> publish a feature so others can collab
alias gffpo='git flow feature pull origin' # <name> get a published feature
alias gfft='git flow feature track' # <name> track a feature
# [Hotfixes]
# > Hotfixes arise from the necessity to act immediately upon an undesired state of a live production version
# > May be branched off from the corresponding tag on the master branch that marks the production version.
alias gfhs='git flow hotfix start' # <version>
alias gfhf='git flow hotfix finish' # <version>
# [Make a release]
# > Support preparation of a new production release
# > Allow for minor bug fixes and preparing meta-data for a release
alias gfrs='git flow release start' # <version|name>
alias gfrf='git flow release finish' # <version|name>
alias gfrp='git flow release publish' # <version|name> publish a release to allow others to contrib
alias gfrt='git flow release track' # <version|name>> track a release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment