-
-
Couldn't load subscription status.
- Fork 657
-
The git cli has a -c option which allows you pass config value overrides that apply to a specific command. This is useful for certain aliases where you don't actually want to update your global config. Is there any mechanism to do this with gitui?
https://git-scm.com/docs/git#Documentation/git.txt--cltnamegtltvaluegt
e.g.
git -c core.excludesfile=$HOME/.alternate.gitignore status
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
So, doesn't look like there is a way to do this currently. It's more of a question for the git2 crate, I suppose.
In this particular case, I was looking for a better way to track dotfiles in a git repo than ignoring all files by default. You can ignore things locally without checking them in to the repo using $GIT_DIR/info/exclude, and you can approximate sharing such a file by symlinking that to the the ignore file that is in version control, e.g.:
rm .git/info/exclude
ln -s path/to/some/ignorefile .git/info/exclude
It's not automatic, though, so would need to do this on every fresh clone. It'll be good forever after that, though, and gitui will work as expected.
Beta Was this translation helpful? Give feedback.
All reactions
-
It's more of a question for the git2 crate, I suppose.
probably even more so for the upstream libgit2 lib
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1