欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

how to remove remote origin from git repo

shiping1 的头像
I am new to git. I just did git init to initialize my folder as git repo and then added a remote repository using git remote add origin url. Now I want to remove this git remote add originand add a new repository git remote add origin new-url. How can I do it?

正确答案

Instead of removing and re-adding, you can do this:

git remote set-url origin git://new.url.here

See this question: Change the URI (URL) for a remote Git repository

来自 http://stackoverflow.com/questions/16330404/how-to-remove-remote-origin-from-git-repo

普通分类: