Advanced git-checkout
This commit is contained in:
parent
de5a133313
commit
8bd52e2017
2 changed files with 11 additions and 1 deletions
|
@ -24,7 +24,7 @@ alias gc="git commit"
|
||||||
alias gca="git commit --amend"
|
alias gca="git commit --amend"
|
||||||
alias gcl="git commit -m 'Linting'"
|
alias gcl="git commit -m 'Linting'"
|
||||||
alias gcn="git commit --allow-empty --message 'noop'"
|
alias gcn="git commit --allow-empty --message 'noop'"
|
||||||
alias gco="git checkout"
|
alias gco="advanced-git-checkout"
|
||||||
alias gcp="git cherry-pick"
|
alias gcp="git cherry-pick"
|
||||||
alias gcs="git commit -m '¯\_(ツ)_/¯'"
|
alias gcs="git commit -m '¯\_(ツ)_/¯'"
|
||||||
alias gct="git commit -m '( ͡° ͜ʖ ͡°)'"
|
alias gct="git commit -m '( ͡° ͜ʖ ͡°)'"
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
function advanced-git-checkout {
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
git branch \
|
||||||
|
| fzf \
|
||||||
|
| xargs -I {} git checkout {}
|
||||||
|
else
|
||||||
|
git checkout $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function ag-count {
|
function ag-count {
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
echo Usage: ag-count SEARCHTERM
|
echo Usage: ag-count SEARCHTERM
|
||||||
|
|
Loading…
Reference in a new issue