In version 0.0.11 of gg you can now type gg commit Bla bla
and it will try to commit but if that fails, it will ask you one more time, if you want to re-attempt to commit but with --no-verify
.
For example:
$ gg commit This is my commit message
❌ file has formatting problems
Commit failed and you did not use --no-verify.
? Try again but with --no-verify? (y/N)
(see screenshots below where color makes these things more intuitive)
This is handy when you know that the .git/hooks/pre-commit
might be failing for a reason that is actually not a problem after you've committed.
In a sample repo I have:
$ cat .git/hooks/pre-commit
#!/bin/sh
echo "❌ Rejecting all commits like an angry troll"
exit 1
And when I use gg commit ...
this happens:
Comments