简体   繁体   中英

Link a local git repository with an existing repository

I'm working on a C project with some friends for school. They helped me to set up everything on my debian partition but I would like to do the same things with Windows. I created an empty local repository but now I would like to "link" it with our project so that I can commit on my branch.

How can I do that ?

You need not create an empty local repository. Just clone the origin again on your windows partition ( git clone url://to/origin ).

If you don't know the url for origin, you can try the following steps (after adapting for your local setup).

On your Debian partition:

cd <working directory>
git config --get remote.origin.url

The url given by the second command is your url for origin. Then on your Windows partition you can do git clone <url you got above> .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM