Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Any way to pass config options to git like -c? #1492

ehaynes99 started this conversation in General
Discussion options

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
You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

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.

You must be logged in to vote
1 reply
Comment options

It's more of a question for the git2 crate, I suppose.

probably even more so for the upstream libgit2 lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /