Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.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
github新手用户尝试将文件推送到github上的repo_Github - Fatal编程技术网

github新手用户尝试将文件推送到github上的repo

github新手用户尝试将文件推送到github上的repo,github,Github,大家好:这是我第一次写这个列表,所以请原谅我的新手问题和其他我没有遵守的规则 我正在FedoraLinux上工作,并试图熟悉git,但实际上是github。因此,我按照各种教程创建了一个github帐户和一个名为markleeds2/bclean的存储库。我还添加了ssh公钥,这似乎很好。回购协议中没有任何文件。于是,我离开了github,转到linux命令行,下面是我根据在某个我不记得的地方找到的教程执行的步骤。显然,我做错了什么,因为我尝试推送文件时出错。提前非常感谢您提供的任何帮助 附言

大家好:这是我第一次写这个列表,所以请原谅我的新手问题和其他我没有遵守的规则

我正在FedoraLinux上工作,并试图熟悉git,但实际上是github。因此,我按照各种教程创建了一个github帐户和一个名为markleeds2/bclean的存储库。我还添加了ssh公钥,这似乎很好。回购协议中没有任何文件。于是,我离开了github,转到linux命令行,下面是我根据在某个我不记得的地方找到的教程执行的步骤。显然,我做错了什么,因为我尝试推送文件时出错。提前非常感谢您提供的任何帮助


附言:我有一种感觉,我的git remote addorigin命令在最后是不正确的 因为里面没有“清洁”

初始提交

未跟踪的文件: (使用“git add…”包含在将提交的内容中)

提交时未添加任何内容,但存在未跟踪的文件(使用“git add”跟踪)

:~/research/equity/projects/git\u hub/git/test>git添加自述
:~/research/equity/projects/git\u hub/git/test>git status
论分行行长
初始提交
要提交的更改:
(使用“git rm--cached…”取消存储)
新文件:README
:~/research/equity/projects/git_hub/git/test>git commit-m'first commit'
[master(root提交)676f27d]第一次提交
:~/research/equity/projects/git_hub/git/test>git-remote-add-origingit@github.com:markleeds2/test.git
:~/research/equity/projects/git_hub/git/test>git push-u原始主机
错误:找不到存储库。
致命:远程端意外挂起

确保您在GitHub帐户中实际创建了
测试
存储库

接下来,只需按照他们提供的步骤进行操作:

mkdir test
cd test
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:Blender3D/test.git
git push -u origin master

谢谢我的github帐户上的存储库名为markleeds2/bclean。我应该把名字改成test吗?谢谢。当你通过GitHub创建存储库时,你应该得到一个空白页面,上面有这些说明。在我的代码中,只需更改
test=>bclean
并将我的用户名与您的用户名交换。好的。谢谢我确实看到了这些说明,但我认为测试指的是linux目录。我会试试看,然后告诉你。我把最后一个命令切换到git remote add origingit@github.com:markleeds2/bclean.git,其回复为:“致命:远程源已存在”。也许我应该删除所有内容,重新开始???非常感谢,非常感谢。我删除了所有内容并重新开始,它没有出现任何问题。再次感谢。似乎您没有在GitHub上创建存储库,可能是git remote add origin上的输入错误git@github.com:markleeds2/test.git?
   README
:~/research/equity/projects/git_hub/git/test> git add README
:~/research/equity/projects/git_hub/git/test> git status
 On branch master

 Initial commit

 Changes to be committed:
   (use "git rm --cached <file>..." to unstage)

       new file:   README


:~/research/equity/projects/git_hub/git/test> git commit -m 'first commit'
[master (root-commit) 676f27d] first commit


:~/research/equity/projects/git_hub/git/test> git remote add origin     git@github.com:markleeds2/test.git

:~/research/equity/projects/git_hub/git/test> git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
mkdir test
cd test
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:Blender3D/test.git
git push -u origin master