This maybe has been answered, but I didn\'t find a good answer.
I come from centralized repositories, such as SVN, where usually you only perform checkouts, updates, c
The link "but why do I need a bare repo?" from the VonC answer could be completed with two use cases I have found recently.
The first is essential to know imho, while the second could be criticized.
No more symlinks which point to you git repo. Just use:
git init --bare $HOME/.myconf
alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME'
config config status.showUntrackedFiles no
where my ~/.myconf directory is a git bare repository. Then any file within the home folder can be versioned with normal commands like:
config status
config add .vimrc
config commit -m "Add vimrc"
config add .config/redshift.conf
config commit -m "Add redshift config"
config push
One of the major benefits is that it prevents nested git repos. More details on the source
It is not a good idea to create a .git/ dir inside a cloud-synced folder because the synchronization could mess everything up. But using the same technique as above you can use a bare repository outside the synced dir to use versioning and still have the comfort of a synced dir.