Git push -u origin master: hangs; nothing happens; repo not updated

Goal: Push my first commit from my local repo to my private repo.


git push -u origin master seems to hang.

That is, it doesn’t product output in the terminal, the repo that I’ve set as the origin doesn’t show the files, and I have to cancel the process via control + c.

git issue.png

What I’ve done:

$ cd leetcode
$ git init
$ echo 'leetcode_problems_cleanup/' >> .gitignore
$ touch problems/
$ git add .
$ git commit -m 'first commit'
$ git remote add origin
$ git push -u origin master

My credentials are stored in my osx keychain.


Have you taken a look at our network troubleshooting documentation? If you need to use the GitHub Debug site, please send in the results directly to private support via the link provided in the documentation.

Let us know if you have more questions.

use git push -f master origin.It worked for me but i hope it may work for u too folk.

1 Like

same problem brother :cry: :cry: