Created
May 30, 2019 17:25
-
-
Save capotej/824355723d4caf65e0d4c315ea46d660 to your computer and use it in GitHub Desktop.
git shell funcs/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
alias co="git checkout " | |
alias commit="git commit " | |
alias status="git status " | |
alias merge="git merge " | |
alias stash="git stash " | |
alias fuckit="git reset --hard" | |
function pushit() { | |
git push origin $(raw_git_branch) | |
} | |
function gca() { | |
git commit -a -m "$*" | |
} | |
function pullit() { | |
git pull origin $(raw_git_branch) | |
} | |
function raw_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
function bdd() { | |
git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate) %(refname:short)' | tac | tail | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment