I need to rsync a git project folder and I'm using the follow rsync flags -r -a -v -u -W but when I run git status on the destination folder it does not match with git status on the source (I get modified/deleted files that were not actually touched).
Why is this happening? And how to make it work as intended?
From rsync manual:
-u, --update skip files that are newer on the receiver
So it may skip files...
Anyway, there is no need for rsync when you have the source dir versioned.
Clone the folder
cd /my/destination
git clone /my/source/repo
Sync the folder
cd /my/destination/repo
git fetch