How do I completely disconnect a local Git repository from all remote branches?
I cloned a Git repository from github.com, but then it was deleted and I don't want Git to report any changes needing to be "pushed up". I've tried googling this, but I think my terminology is wrong, and I'm not finding anything.
Can I simply delete the [remote "origin"]
and [branch "master"]
sections from my .git/config file or will that break my local repository?
by running "git remote rm origin", you will just remove the connection from your repo to the remote origin without losing all history, branches, tags and stashes you had locally.. It would then for example be possible to connect to a different (ideally empty) remote and push everything to that one..
Use rm -r switch with the git command to remove directory recursively. After removing the directory you need to commit changes to the local git repository. Then push the changes to remove the directory from the remote git repository.
git remote rm origin
should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With