I created a git repository in folder A. And then, I push it to a remote (let's say it's called D) Then, I delete folder A, and create a new folder B with very different files/folders inside it. And, I want to change the remote D so it's pointing to B.
How to do it? thanks
git init
git add .
git commit -a -m "Initial commit"
git remote add origin <D>
git push -fu origin master
This will destroy the history on D, so beware and if some one else is referring to that remote it might piss them off.
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.