简体   繁体   English

git push origin 什么都不做

[英]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.我目前正在学习如何使用git和github环境,但是在执行代码git push origin main和give enter的时候,控制台什么都不做,也不允许我执行更多的代码。

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.这取决于您的操作系统和您的git config credential.helper值:Git 可能会尝试访问凭证助手(以缓存您的 GitHub 凭证)但失败。

That would explain why a git push (preferably using main: git push -u origin main ) hangs.这将解释为什么 git push (最好使用 main: git push -u origin main )挂起。

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 .如果您使用的是 Windows,请确保使用最新的Git For Windows (2.32.0. 2 ),因为Git 2.32.0.1存在一个错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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