Skip to content

Instantly share code, notes, and snippets.

@laraconda
Last active December 29, 2016 00:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laraconda/d33a18f0e34e607c6ca9168d69d889b3 to your computer and use it in GitHub Desktop.
Save laraconda/d33a18f0e34e607c6ca9168d69d889b3 to your computer and use it in GitHub Desktop.
Change the ownership of files in a project after a git [merge]. This file must be placed in .git/hooks/.
#!/bin/sh
echo "Your message"
sudo chgrp -R [grp] [a/dir]
# Changing ownership of sockets
sudo chgrp www-data [a/dir]/*.sock
# Permissions must be 755
# To use this file after a git checkout name it: post-checkout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment