I have git integrated with gerrit,
I am trying to stop committing binary files into git,
Here is what I tried:
I added *.bin in .gitignore file,
But that can be skipped using -f option while committing,
Can anyone suggest an alternative method?
If you really want to prevent any binary to make it to the repo managed by gerrit, you can add a pre-receive hook detecting binaries and rejecting the push: see "Is there a git hook which can prevent binary check-ins".
That way, you still can accidentally commit binaries, but you won't be able to push them to the remote repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With