When you executed git commit test.txt, it failed (note that there are three words "stopped" at the bottom). The reason is that git forces the commit operation to have comments (svn is not mandatory), and you did not add comments. You have to execute "git commit -m "Write a comment here, it can be in Chinese"" before you can submit normally. Then "git remote add origin git@github.com/xxxx/xxx.git". Finally "git push origin master" will do the trick.
First, pay attention to the running results of the command. After the previous command runs successfully, run the following command again. The author started to get errors from the third git command, git commit都没有成功,后续的push命令当然也会报错。另外,由于楼主的仓库貌似默认已经有远程仓库(origin)了,因此再通过git remote add origin ...设置远程仓库当然会产生冲突。你可以换一个远程仓库的别名,例如楼上说的upstream,或者你可以通过git remote set-url origin <your remote repository url> came to reset the origin URL. It can be seen from your operation that you should be a beginner. It is recommended that you understand the basic commands of git first, and then come to the forum to ask questions when you encounter complex problems. By the way, the book Progit is a good choice for learning git. There is a free electronic version on the official website. In addition, I think if you can use text explanation + code or error log when asking a question, try not to post pictures directly, as this will not be convenient for others to search online.
In addition to the method above + Baidu should be able to solve it
You try it
ssh -T git@github.com
看看有没有权限另外
git commit
一般都写成git commit -m "first commit"
As mentioned above, you did not use -m to specify the commit message when committing, causing the commit to fail.
Doesn’t the remote branch already exist? First set-upstream, then pull and push
When you executed git commit test.txt, it failed (note that there are three words "stopped" at the bottom). The reason is that git forces the commit operation to have comments (svn is not mandatory), and you did not add comments. You have to execute "git commit -m "Write a comment here, it can be in Chinese"" before you can submit normally. Then "git remote add origin git@github.com/xxxx/xxx.git". Finally "git push origin master" will do the trick.
Usually use commit -m "modify version information", and then use git add remote origin + information.
There is nothing in the local library
`git status
git add .
git commit -m "update" `
Then push.
Transfer your public key to
github
firstFirst, pay attention to the running results of the command. After the previous command runs successfully, run the following command again. The author started to get errors from the third git command,
git commit
都没有成功,后续的push
命令当然也会报错。另外,由于楼主的仓库貌似默认已经有远程仓库(origin)了,因此再通过git remote add origin ...
设置远程仓库当然会产生冲突。你可以换一个远程仓库的别名,例如楼上说的upstream,或者你可以通过git remote set-url origin <your remote repository url>
came to reset the origin URL.It can be seen from your operation that you should be a beginner. It is recommended that you understand the basic commands of git first, and then come to the forum to ask questions when you encounter complex problems. By the way, the book Progit is a good choice for learning git. There is a free electronic version on the official website.
In addition, I think if you can use text explanation + code or error log when asking a question, try not to post pictures directly, as this will not be convenient for others to search online.