From 34a6607a08cfa0f5193167bf2d7e1fa434f75a92 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Sun, 18 Dec 2022 13:54:09 +0100 Subject: [PATCH] Move git ignore command into separate script --- bin/git-ignore | 8 ++++++++ gitconfig | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 bin/git-ignore diff --git a/bin/git-ignore b/bin/git-ignore new file mode 100755 index 0000000..05631e7 --- /dev/null +++ b/bin/git-ignore @@ -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 diff --git a/gitconfig b/gitconfig index c545f28..8434467 100644 --- a/gitconfig +++ b/gitconfig @@ -30,7 +30,6 @@ track = add --intent-to-add h = log -1 --format=%h hash = log -1 --format=%H - ignore = "!$(git config --get core.editor) $(git rev-parse --show-toplevel)/.git/info/exclude" [user] useConfigOnly = true [user "darkwiiplayer"]