I have written a git hook that prevents files over a certain size from being committed. However, I would only like a pop-up warning and prevention of a commit the first time the user tries to commit, and they would have the opportunity to ignore the warning and commit anyway. The post-commit wouldn't really work for this since I would like to block the commit once.
I was looking at taking user input but it seems like STDIN for git hooks don't really work without a very hacky approach (that doesn't work for me anyway), and there isn't really any other way to "ignore" a pre-commit hook and commit anyway.
Is there an alternative to skipping a git hook on the second go without just completely disabling the hook? Preferably using bash.