简体   繁体   中英

Git clone from clone

I have cloned a git repository from a server, and then I have cloned a second copy from my local copy.

Unfortunately I have deleted the first copy (from the server), and I have only the second copy. I would like to push this second copy to the server now. With a simple "git push" I got the message "Already up-to-date.", but the server is not updated.

I was thinking of deleting all the .git folders, cloning a new copy from the server, and then put my local copy into it. But this way I'll loose all of my logs.

Is there a more elegant way of doing this?

Thanks

尝试这个

git remote set-url origin https://github.com/username/yourrepo

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