How to disconnect a local git repository from a remote wizard

How to completely disconnect a local git repository from all remote main branches?

I cloned the git repository from github.com, but it was deleted, and I do not want git to report any changes that need to be "pushed." I tried this, but I think my terminology is wrong and I find nothing.

Is it possible to simply delete the [remote "origin"] and [branch "master"] sections from my .git/config file or violate the local repo?

+7
git
source share
2 answers

git remote rm origin should work.

+22
source share

It works:

To remove a remote: git remote remove origin

To add a remote: git remote add origin yourRemoteUrl & git remote add origin yourRemoteUrl ; then git push -u origin master

+3
source share

All Articles