Yes, I think it's a bad idea. Don't get me wrong, the reason to do it sounds great, but the result could still be horrible.
You will have merge conflicts when pulling a tracked branch, atleast I fear that would be the case, I might be wrong though.
I don't want to test it right now at work, but you should try it out yourself.
In fact you can just check out a recent commit. Make a new branch, commit something petty, cherry pick or merge with no autocommit.
Then run your script, pull and if your result is a horrible merge mess, then you should definitly not do this, at daylight.
Instead you could potentially put it into a nightly build or a weekly build.
But even a nightly might be a bad idea.
You could either run it weekly, when you are sure no merge conflicts will arise because everything is finished on monday.
Otherwise run it 1-2 times a year on holiday season, when merge conflicts will not occur.
But the solution might depend on your priority for code style.
I think that making a setup script that automatically creates the git repository and sets the hooks for the project would be better.
Or you might include the hook setup script in a folder for your devs within the project and simply check it into git itself.