Copy repos between devices using bash
Sometimes it’s helpful to copy a Git repository directly from one machine to another without using a Git host like GitHub. If you can SSH into the machine(s) involved, you can use Bash’s rsync command. Rsync’s defaults aren’t great for copying repos for several reasons, but a Bash script can fix that. I named the script ,cp-repo (copy repo): ,cp-repo . staging:/home/chris/repos/url-shortener This copies the current directory (.) to /home/chris/repos/url-shortener in a machine named staging as defined in an SSH config file....