I have a git repository (and working directory) that is stored in my Dropbox so I can move back and forth between computers without having to commit or stash (read: without any
I've gotten this exact problem under the same circumstances.
To stop the files showing in git status
you can set git to ignore file mode changes:
git config core.filemode false
This change is local to the git repository and will be synced along with the files.
You may want to check where you are setting your umask; it may be that dropbox is starting with a different umask than what your shell has. However, I believe that git ignores the group/other permissions and is mostly concerned with the execute bit, which should not be affected by the umask. Some thoughts for debugging:
git checkout -f
on the files in question, do they get the correct permissions?chmod
a file on one system, does that change get propagated?The fact you are using Macs is relevant - the Macworld Hints article mentioned in a comment explains the issue (but read down to the comment that explains how to fix permissions with chmod u+rwX
etc, rather than absolute permissions that may mess things up).
This Dropbox Support answer explains what's probably going on and how to fix it - related to how MacOS X Leopard (10.5) changed the default usage of ACLs.