Reputation: 36357
I'm working on a flask app in a local git repo. I've come across a python script that I would like to import into my project root from github. I'm not sure how to "pull in/import" this script into my local repo, without affecting my pre-existing code. Can someone advise me here. Is it as simple as
git clone https://github.com/xxx/yyy.git
( I don't want to try for fear of messing up my local repo )
Upvotes: 0
Views: 54
Reputation: 26
You can add an additional remote branch to your repo:
git remote add <yyy> https://github.com/xxx/yyy.git
Once that's done, you can pull directly from your new remote with:
git pull <yyy> master
This will automatically attempt to merge the code from the remote repo into your local repo.
Upvotes: 1