Answer the question
In order to leave comments, you need to log in
How to use someone else's repository in your own?
I have my repository (A) and I clone another user's repository (B) into my repo. And if I want to change repository B, then git swears and does not allow me to do this. Colonized with (git clone)
Answer the question
In order to leave comments, you need to log in
There are 3 options:
1. Add a third-party repository as a submodule:
git submodule add B_repo_url
This method is suitable if you do not want to store third-party code in your repository or split your repository into several different repositories (modules).
When cloning to another machine, you will need to add the --recursive flag to the "git clone" command to clone all code, including submodules.
git clone repo_A_url --recursive
or
git clone repo_A_url && git submodule update --init
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question