I do it by:
1) having a git repository in ~/config that contains, among other things, my global .gitconfig and .gitignore files. This repository is synced across machines.
2) having a .gitconfig in my home directory that's symlinked to config/.gitconfig and similarly for .gitignore.