linux - GitHub 帮助 - 将文件夹推送到存储库

标签 linux git github ssh repository

我正在使用 Linux Mint 18 并尝试将我的工作(整个文件夹)推送到我的 github 存储库。我尝试了网站上讨论的 SSH 和 HTML 方法,但无法保存我的工作。这是我尝试过的:

git init
git remote set-url origin https://github.com/glicka/Neutron-Scatter-Camera.git
fatal: No such remote 'origin'
ssh git@github.com:glicka/Neutron-Scatter-Camera.git
ssh: Could not resolve hostname github.com:glicka/neutron-scatter-camera.git: Name or service not known

请帮忙。我是 git 的新手,只是想不通。我想将整个文件夹推送到我的存储库。

最佳答案

执行:

git remote -v

验证您是否有一个名为 origin 的远程。

如果你没有任何 Remote ,你可以通过执行以下命令添加一个名称为 origin 的 Remote :

git remote add origin https://github.com/glicka/Neutron-Scatter-Camera.git

关于linux - GitHub 帮助 - 将文件夹推送到存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44767886/

相关文章:

C:在不使用全局变量的情况下,从创建的线程中操作在 main 中声明的结构

android - 如何从/dev/iio :deviceX?中读取LSM330的数据

python - Git-在本地分支上进行了更改, checkout 了 master,并且 master 现在已损坏

git - 当 git 存储库有多个远程仓库时,如何保护提交者的身份?

Github API : Get number of contributions on a day by day basis

java - 跨团队强制执行 Github 存储库的编码标准

ruby-on-rails - 安装 do_postgres (0.10.16) 时发生错误 Bundler 无法继续。确保 'gem install do_postgress -v ' 0.10.16' 成功

linux - 打开文件过多错误,但 99.5% 的 inode 是免费的

GitHub 桌面 : Git could not be found at the expected path

git - 索引有reflog吗?