Git Pain

Here is a list of previous issue I had to solve with Git.

Change Repository location

How to move my repository to a new location when I realize I named it wrong. SuperZero : being my virtual username new_project_repo_name : being the new repository name. main : the main branch ( can be master for old projects.)

1
2
git remote set-url origin https://github.com/SuperZero/new_project_repo_name
git push origin main --force

Next, do not forget to remove the incorrect repository.