fixed bad git initialization in setup script
cherry pick
Made a partial hook. Still buggy, misses delete and update actions.