I created a local GIT repository on Windows. Let’s call it AAA. I staged, committed, and pushed the contents to GitHub. git@github.com:username/AAA.git
I realized I made a mistake with the name.
On GitHub, I renamed it to git@github.com:username/BBB.git
Now, on my Windows machine, I need to change git@github.com:username/AAA.git to git@github.com:username/BBB.git because the settings are still trying to “push” to git@github.com:username/AAA.git but I need to push to git@github.com:username/BBB.git now.
How could I do that?
The easiest way to tweak this in my opinion (imho) is to edit the .git/config file in your repository. Look for the entry you messed up and just tweak the URL.
On my machine in a repo I regularly use it looks like this:
The line you see commented out is an alternative address for the repository that I sometimes switch to simply by changing which line is commented out.
This is the file that is getting manipulated under-the-hood when you run something like
git remote rmorgit remote addbut in this case since its only a typo you made it might make sense to correct it this way.