I have a pre-commit hook that:
- checks if my version file needs to be updated
- modifies said file
- performs a git add on this file
This allows me to add the updated version file to the same commit. The only problem I have is, after the hook runs the working tree and HEAD are updated with the new version file but the index isn't. I need to manually stage the version file for the index to reflect the changes.
I updated git to 2.3.4 but that doesn't solve anything.
Am i missing anything here?
UPDATE
The current setup for version files:
- Every module contains a version file
- they are stored here:
/module/<name of module>/version.txt
- they contain a manually entered version number (eg 1.5.2) and the parent commit hash