Make gfc ignore untracked files by default
This commit is contained in:
parent
c7fa78c3a4
commit
29ad47e394
2 changed files with 5 additions and 2 deletions
|
@ -20,7 +20,8 @@
|
||||||
[alias]
|
[alias]
|
||||||
adog = log --all --decorate --oneline --graph --date-order
|
adog = log --all --decorate --oneline --graph --date-order
|
||||||
dog = log --decorate --oneline --graph --date-order
|
dog = log --decorate --oneline --graph --date-order
|
||||||
fadd = "! git status --porcelain | sed 's/^...//' | fzf -m --layout=reverse-list | xargs --open-tty git add"
|
fadd = "! git status --porcelain | sed -e '/^??/d' -e 's/^...//' | fzf -m --layout=reverse-list | xargs --open-tty git add"
|
||||||
|
faddall = "! git status --porcelain | sed 's/^...//' | fzf -m --layout=reverse-list | xargs --open-tty git add"
|
||||||
fixup = "!git commit --patch --no-edit --amend $(git diff --name-only HEAD~1..HEAD)"
|
fixup = "!git commit --patch --no-edit --amend $(git diff --name-only HEAD~1..HEAD)"
|
||||||
h = log -1 --format=%h
|
h = log -1 --format=%h
|
||||||
hash = log -1 --format=%H
|
hash = log -1 --format=%H
|
||||||
|
|
|
@ -24,17 +24,19 @@ pp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gfc() {
|
gfc() {
|
||||||
|
command="fadd"
|
||||||
unset patch
|
unset patch
|
||||||
while test $# != 0
|
while test $# != 0
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--patch | -p) patch="--patch" ;;
|
--patch | -p) patch="--patch" ;;
|
||||||
|
--untracked | -u) command="faddall" ;;
|
||||||
--) shift; break ;;
|
--) shift; break ;;
|
||||||
*) break ;;
|
*) break ;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
git fadd $patch && git commit $@
|
git $command $patch && git commit $@
|
||||||
}
|
}
|
||||||
|
|
||||||
# Funny
|
# Funny
|
||||||
|
|
Loading…
Reference in a new issue