Is putting a Git workspace in a synced folder really a good idea?

You can, and it’ll sync just fine, but you shouldn’t.

A Git repository is not like a collection of documents. In a collection of documents, each file is mostly independent so it’s easy to “merge” when one file has changed on one device and another file on another device. A Git repository on the other hand is made up of a bunch of files that should be internally consistent with each other. “Merging” two Git repositories that have diverged cannot be done by just copying in the newest files from each - it must be done by understanding the contents, doing an actual merge with a new commit, etc.

So no, don’t. Use a central Git repository and push/pull from it, like Linus intended. :)

3 Likes