0

enter image description here

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 )

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.