Created
January 31, 2014 17:00
-
-
Save numeraltwo/8736288 to your computer and use it in GitHub Desktop.
useful git and git-flow aliases
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
# GIT / GIT FLOW ALIASES | |
alias gs="git stash" | |
alias gsa="git stash apply" | |
alias gsl="git stash list" | |
alias gsc="git stash clear" | |
alias gft="git fetch --tags" | |
alias gpt="git push --tags" | |
alias gcm="git checkout master" | |
alias gmm="git merge master" | |
alias gcd="git checkout develop" | |
alias gmd="git merge develop" | |
gcf() { git checkout feature/$1; } | |
gffs() { git flow feature start $1; } | |
gfff() { git flow feature finish -F $(git_flow_current_branch); } | |
gch() { git checkout hotfix/$1; } | |
gfhs() { git flow hotfix start $1; } | |
gfhf() { git fetch --tags; git pull origin master; git flow hotfix finish -F $(git_flow_current_branch); } | |
gcr() { git checkout release/$1; } | |
gfrs() { git flow release start $1; } | |
gfrf() { git flow release finish -F $(git_flow_current_branch); } | |
git_flow_current_branch(){ git rev-parse --abbrev-ref HEAD | cut -d'/' -f 2; } | |
glt() { | |
LAST_TAG=$(git for-each-ref --format="%(refname:short)" --sort=taggerdate refs/tags | tail -1 | git for-each-ref --format="%(refname:short)" --sort=taggerdate refs/tags | tail -1); | |
echo $LAST_TAG | xargs echo -n | pbcopy; | |
echo "LAST TAG: "$LAST_TAG; | |
} | |
gut (){ | |
git tag -d $1; | |
git push origin :refs/tags/$1; | |
} |
Nice man!
Feel like I am so ignorant when I found this alias created 5 years ago -,-
👍✨
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice