I am running Git on two computers, machine A (OS X) and machine B (Windows 10), while remote hosting on Github. My local working directories for both machine A and B are synced with Google Drive.
I noticed the other day that any time I make a commit on machine A (even when no changes occurred), machine B all of the sudden has modified files which need to be staged and committed.
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README.md
modified: helper_scripts/scriptA.py
modified: helper_scripts/scriptB.py
modified: helper_scripts/scriptC.py
modified: helper_scripts/scriptD.py
no changes added to commit (use "git add" and/or "git commit -a")
Once I run the following on machine B,
git add .
git commit -m 'some message'
I get the following message on machine B:
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
Then I check git status
on machine A, and the whole process repeats again and again ... This appears to be unusual behavior because I am not making any changes to the files. I hypothesize that Google Drive syncing is causing the issue somehow.
How can I get Git, GitHub and Google Drive to play nice together so as to avoid this vicious cycle I seem to be caught in?