Last active
July 29, 2023 08:42
-
-
Save sp00nman/935e19d9ab5369e9ca72 to your computer and use it in GitHub Desktop.
rsync to synchronize repositories before committing to github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gist kindly provided by M.Schuster (https://github.com/mkschuster) | |
rsync \ | |
--verbose \ | |
--recursive \ | |
--delete \ | |
--times \ | |
--rsh 'ssh' \ | |
--exclude '*~' \ | |
--exclude '.DS_Store' \ | |
--exclude '.idea' \ | |
--exclude '.git' \ | |
--exclude '.gitignore' \ | |
--exclude '*.pyc' \ | |
"${HOME}/path/to/repository/" \ | |
"${LOGIN}:/path/to/repository"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
carefull with
--delete
; folder/files will disappea/deleted if not present on both sides (client/server)