Configuration for one command only
suggest changeYou can use -c <name>=<value> to override a configuration value for one command.
To commit with a different email without changing .gitconfig:
git -c user.email=mail@example.com commit -m "some message"
Note: for that example you can override just user.email or just user.name. The other value still comes from your configuration, not from earlier commits. There must be no spaces around =.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents