Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The company I work for is using Git for deployment and because of this it overwrites specific permissions and ownerships. What is the best way to make sure that the folder ownerships and permissions are preserved when a git pull is conducted?

I do development on OS X, using MAMP, push to a staging server which is a clone of the environment on production. When it reaches Staging I have to correct the permissions afterward but they are usually set to 664 instead of 644, causing issues with suPHP.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Can you use one of the git hooks?

Probably the post-checkout hook.

share|improve this answer
    
Would that work with git-pull? –  OpensaurusRex Mar 9 '12 at 20:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.