Move git ignore command into separate script

This commit is contained in:
Talia 2022-12-18 13:54:09 +01:00
parent f8878e3f29
commit 34a6607a08
2 changed files with 8 additions and 1 deletions

8
bin/git-ignore Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
if [ -z "$@" ]
then
!$(git config --get core.editor) $(git rev-parse --show-toplevel)/.git/info/exclude
else
ls -d "$@" >> "$(git rev-parse --show-toplevel)/.git/info/exclude"
fi

View file

@ -30,7 +30,6 @@
track = add --intent-to-add track = add --intent-to-add
h = log -1 --format=%h h = log -1 --format=%h
hash = log -1 --format=%H hash = log -1 --format=%H
ignore = "!$(git config --get core.editor) $(git rev-parse --show-toplevel)/.git/info/exclude"
[user] [user]
useConfigOnly = true useConfigOnly = true
[user "darkwiiplayer"] [user "darkwiiplayer"]