我在其提示符中输入以下Git Bash命令,但仍无法将文本添加到文件中并将其推送到我的远程GitHub存储库。
vim HelloWorld.md
## This is a markdown file
git add HelloWorld.md
https://github.com/myusername/nameofmyremotegithubrepository
如果有人可以提供帮助,我将非常感激。
答案 0 :(得分:0)
如果您克隆了github存储库,请进行更改,添加文件(git add <file>
),提交(git commit -m "<commit message>"
),然后使用git push origin <branch>
推送
如果你还没有克隆但是你已经创建了一个空的github存储库(https://github.com/myusername/nameofmyremotegithubrepository):
git init
git remote add origin https://github.com/myusername/nameofmyremotegithubrepository
git add <file>
),git commit -m "<commit message>"
),git push origin <branch>
答案 1 :(得分:0)