I have a central Git repository hosted with GitLab, and my coding is done on either a laptop or desktop. Pulling the code to work on it on either machine and then committing and pushing when finished works fine, but I'd like to have a cleaner way to switch between laptop and desktop (sometimes I run out of time on the desktop and have to finish something on the laptop). Right now I'd have to commit and push from one machine, then pull from the other, but that's not ideal, since sometimes the switch has to happen when I'm in the middle of something and I'd rather not commit broken code.
Potential solution: Clone/pull from both machines into a synced Dropbox (or similar) directory, so that code is synchronized across machines automatically, then commit/push on my own terms (when the thing works, to keep my history cleaner and collaborators happy).
Is there any danger of corrupting the repo by checking it out in an automatically-synced Dropbox folder? Does the .git folder contain any environment-specific details or absolute file paths that might get conflicted in a cross-machine (and cross-OS, Windows-Ubuntu) sync?