Git cloning twice and tapping two levels

I am new to git. I do not know if this is possible. what i do, i cloned the remote repository on my desktop. Then I again cloned the cloned repo to another folder. There is anyway to connect all these repos. Can I make changes to the second clone and pass it through the first clone and finally to the remote repository?

+4
source share
1 answer

You can change the start of the second clone to directly click on the remote repo:

cd /path/to/second/clone
git remote set-url origin /url/of/remote/repo

Or you can add a new remote (still in the second clone) to reference the original remote repo

cd /path/to/second/clone
git remote add upstream /url/of/remote/repo

.
git push upstream aBranch .

+3

Source: https://habr.com/ru/post/1598817/


All Articles