Skip to content

Instantly share code, notes, and snippets.

@sp00nman
Last active July 29, 2023 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sp00nman/935e19d9ab5369e9ca72 to your computer and use it in GitHub Desktop.
Save sp00nman/935e19d9ab5369e9ca72 to your computer and use it in GitHub Desktop.
rsync to synchronize repositories before committing to github
# 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";
@sp00nman
Copy link
Author

carefull with --delete; folder/files will disappea/deleted if not present on both sides (client/server)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment