Make gfc ignore untracked files by default

This commit is contained in:
Talia 2023-10-13 10:23:06 +02:00
parent c7fa78c3a4
commit 29ad47e394
2 changed files with 5 additions and 2 deletions

View File

@ -20,7 +20,8 @@
[alias]
adog = log --all --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)"
h = log -1 --format=%h
hash = log -1 --format=%H

View File

@ -24,17 +24,19 @@ pp() {
}
gfc() {
command="fadd"
unset patch
while test $# != 0
do
case "$1" in
--patch | -p) patch="--patch" ;;
--untracked | -u) command="faddall" ;;
--) shift; break ;;
*) break ;;
esac
shift
done
git fadd $patch && git commit $@
git $command $patch && git commit $@
}
# Funny