Synchronise files in Linux

rsync -av --exclude-from=.gitignore path1/ path2/