Whenever I need to push my new local commits to GitHub I use the Windows GitHub desktop application. I open it up and click the sync button. I want to be able to do it from the Git Bash command line. I think the command I want to use is:
git push origin master
but when I do that I get some sort of invalid username error. I tried this:
https://stackoverflow.com/a/20871910/280319
but when I do that and git push origin master
I get another error saying git@github.com:user/repo.git
is an invalid repo.
Now I'm at the point where I changed my origin back to https://github.com/user/repo.git
(I think that's what it was set to before). But since I did that my local repo is now not "pointing" to the correct remote(I can tell because git status
doesn't list 1 out of sync commit and neither does the GitHub desktop app).
This is all just on a test repo of mine.
So what do I have to do so that I can push to GitHub using the Git Bash command line?