I accidentally performed a git remote rm <remote_repo_name> 🙁
Will a git remote add remote_repo_name <remote_repo_path> add it back as a remote even though the remote already had previously pushed content ?
I accidentally performed a git remote rm <remote_repo_name> :( Will a git remote add
Share
Yes.
git remote addjust tells your repository about the remote repository. It doesn’t do anything with the content of that repo. Sogit remote rmandgit remote addare inverse operations.When you do a
git fetch, git will be smart enough not to download the stuff you already have locally again. This is a consequence of how git works under the hood and not really relevant to your question; you should just know that you’ve lost nothing by accidentally removing the remote.