Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用此Git Bash代码仍然无法输入文本并将文件推送到GitHub存储库_Git_Bash - Fatal编程技术网

使用此Git Bash代码仍然无法输入文本并将文件推送到GitHub存储库

使用此Git Bash代码仍然无法输入文本并将文件推送到GitHub存储库,git,bash,Git,Bash,我在提示符中输入了以下Git Bash命令,但仍然无法向文件中添加文本并将其推送到远程GitHub存储库 vim HelloWorld.md ## This is a markdown file git add HelloWorld.md https://github.com/myusername/nameofmyremotegithubrepository 如果有人能帮助我,我将不胜感激。如果您克隆了github存储库,请进行更改,添加文件(git add),提交(git c

我在提示符中输入了以下Git Bash命令,但仍然无法向文件中添加文本并将其推送到远程GitHub存储库

vim HelloWorld.md  
## This is a markdown file  
git add HelloWorld.md  
https://github.com/myusername/nameofmyremotegithubrepository  

如果有人能帮助我,我将不胜感激。

如果您克隆了github存储库,请进行更改,添加文件(
git add
),提交(
git commit-m”“
),然后使用
git push origin

如果尚未克隆,但已创建空的github存储库():

  • 在文件系统上为您的回购创建文件夹
  • 将cd复制到文件夹中
  • git init
  • git远程添加源https://github.com/myusername/nameofmyremotegithubrepository
  • 做些改变
  • 添加文件(
    git add
  • 提交(
    git commit-m”“
  • 然后使用git推送原点推送
  • 选中此项:

    vim ~/.ssh/id_rsa.pup
    
    如果找不到此文件,请复制生成的字符串并尝试生成ssh公钥


    确保将此公钥添加到github。

    我认为您应该从github获得访问令牌。检查一下您使用的是什么操作系统?问题是您不能在本地更新文件,或者您不能将文件推送到远程,或者两者都有?您是否执行了其他命令?您提交更改了吗?您执行了
    git commit
    git push
    命令了吗?您好,pedrorijo91。谢谢你非常全面和有益的答复。janice4928