简体   繁体   中英

git push origin does nothing

I am currently learning how to use the git and github environment, but at the time of executing the code git push origin main and give enter, the console does nothing and does not allow me to execute more code.

The codes that I executed were:

git init
git add .
git commit -m "first commit"
git status

git remote add origin https://github.com/USER_NAME/PROJECT_NAME.git
git pull origin main
git push -u origin master

In this order, respectively.
I hope you can help me.

It depends on your OS and your git config credential.helper value: Git might try and access a credential helper (to cache your GitHub credentials) but fails.

That would explain why a git push (preferably using main: git push -u origin main ) hangs.

If you are on Windows, make sure to have the latest Git For Windows (2.32.0. 2 ), as there was a bug with Git 2.32.0.1 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM