If you accidentally delete your remote repository on Github, which is really stupid, but it happened to me once, despite the requested confirmations... you will have errors when trying to push from the Github Desktop App!
-
Create a new repository on Github from your account with the same name as your previous repository. IMPORTANT: Make sure to not initialize the repository with a
README
,.gitignore
, orlicense
since you already have files locally that you want to push. -
In the terminal, navigate to your local repository's directory:
git remote set-url origin https://github.com/your-username/your-repository.git