I am trying to write a pre-commit hook that changes the line in my code, but I donβt even know where to start.
The problem is this:
I have a KEY
public static final String APP_KEY = "";
To avoid posting KEY to the repository, I think git hooks are what we need, instead of manually deleting the key. I look at Configuring git hooks , but I don't know how to write a hook.
Is there a way before committing the changes, delete KEy and after committing write the key again?
git githooks pre-commit
elbaulp
source share