I have a project in php with the use of GIT and there is a file called "version" with inside "1". I want that when i commit the number is incremented. I am using the git hook feature with this script:
num=$(cat version)
num=$(expr 0$num + 1)
echo $num > version
git add -u version
All work fine except that when i check on the ide (phpstorm), the file stay "blue" (not syncronized) so if i click commit i see the file "version" modified.