Created
          October 24, 2016 23:16 
        
      - 
      
- 
        Save prmichaelsen/026050279132c6d7cb101b40919a639e to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or 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
    
  
  
    
  | #!/bin/bash | |
| # script for cloning repos from org | |
| # and setting up remotes | |
| # must have existing fork of target repo | |
| if [ "$#" -ne 2 ]; then | |
| echo "Usage: clone_repo.sh <git username> <repository name>" | |
| else | |
| git clone https://www.github.com/"$1"/"$2".git "$2" | |
| git -C ./"$2" remote add upstream https://www.github.com/prmichaelsen/"$2".git | |
| fi | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment