Basically, the same feature as requested here: 
https://stackoverflow.com/questions/23400449/how-to-make-git-temporarily-ignore-gitconfig

I'd like an option to override gitconfig location, eg:

`git --gitconfigfile=~/.gitconfig_temp diff`

use cases: same as on that post:

   - Scripting Git: restrict to default settings for portability.
   - Debugging Git: restrict to default settings for reproducibility


I don't want to affect git globally, just for duration of command.
The current workarounds are not good:

this affects other unrelated git commands, and you have to remember to call 
`disableconfig` (your script could fail and not reset it)
```
alias enableconfig="mv ~/.hiddengitconfig ~/.gitconfig";
alias disableconfig="mv ~/.gitconfig ~/.hiddengitconfig";
``` 

`HOME=$HOME/althome git <args>` has other side effects, eg if some git 
command relies on `$HOME`


Lots of other tools allow you to change config file location, eg `TIGRC_USER` 
for `tig`


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/94f57bef-a19a-4fdd-8476-1bdff61040e5%40googlegroups.com.

Reply via email to