I don't do that, but I was once bitten by iCloud. I always put my code in ~/code and copy it over when I get a new machine. I once had the idea to just put it in ~/Documents/code, thinking it'd be automatically synced. Turns out that iCloud doesn't sync dotfiles.