I confess that I sometimes use git commit -a
when I should not. It's gotten to be reflex about half the time, often when I think I'm working in separate repositories - but I'm actually working in a much larger one that will affect directories far and wide.
Is there a .git/config
setting I can specify that will cause the -a
flag to throw an error?
Is there a .git/config setting I can specify that will cause the -a flag to throw an error?
Not that I know of.
You would need a wrapper for git which would check the arguments ("commit
", "-a
", ...), and on the specific command "commit -a" would throw an error.
Jubobs' script (mentioned in the comment above) is a good example of such a wrapper.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments