Pages

Friday, February 24, 2017

Bash: Automating the cloning of repository


Create this bash file to clone your repository excluding .git, etc. directory or files.
#!/usr/bin/bash
ROOT_DIR="/Users/username/Documents/"

rsync -avzh --delete $ROOT_DIR"/project1/" $ROOT_DIR"/project2" --exclude '.git' --exclude 'README.md' --exclude 'LICENSE' --exclude '.gitignore'

echo "Done!"

No comments:

Post a Comment