I don't like to have the home directory git repository, simply because you run into weirdness with sub-directories of home also being git repos.
After playing with this idea I now selectively sync what I want sync'd into a project directory and use that as a place to make backups and restore from. That way there isn't a .git in the home directory.
Make a working directory wherever, and then place a
backup.sh in it that looks something like this with any modifications you want (i.e. you may want to add your documents folder or whatnot)
# = rsync stuff =
# -a, --archive
# This is equivalent to -rlptgoD.
# It is a quick way of saying you want recursion and want to preserve almost everything (with -H being a notable omission).
rsync --mkpath -a ~/.icons ./home_archive
rsync --mkpath -a ~/.themes ./home_archive
rsync --mkpath -a ~/Pictures/1079333.png ./home_archive/Pictures/
rsync --mkpath -a ~/.config/xfce4 ./home_archive/config
rsync --mkpath -a ~/bin ./home_archive
rsync --mkpath -a ~/.profile ./home_archive
rsync --mkpath -a ~/.Xmodmap ./home_archive
rsync --mkpath -a ~/.zshrc ./home_archive
This will then sync what you want syncing into
home_archive. To restore, from the parent directory of
home_archive, use the command
rsync --mkpath -a home_archive/* ~
Downside is that you need enough disc space to make the clone, but it keeps things much cleaner.
If you want to use a more carpet bombing approach and then exclude things like with a gitignore, then rsync can be used like that also . .
rsync -a --exclude '*.txt' --exclude 'dir3' --exclude 'dir4' sourcedir/ destinationdir/