如何从cloud9推送到github?
我正在尝试将一些更改从 cloud9 推送到 github 存储库,但遇到了障碍。
我可以使用 ssh 克隆 OK,一切似乎都正常,我进行更改,将更改保存在 cloud9 中(当我返回时,更改仍然存在),然后我执行 git commit 并得到:
no changes added to commit (use "git add" and/or "git commit -a")
但我只需要提交对现有文件的更改而不是添加。很明显,当我尝试 git push origin master 时,没有任何东西可以推送。
我尝试了多个 github 存储库,得到了相同的结果。
我缺少什么?
任何帮助表示赞赏!
PS哦,顺便说一句,我对 git 很烂
I am trying to push some changes from cloud9 to a github repository but I am hitting a roadblock.
I can clone OK with ssh, and everything seems to be OK, I make my changes, save the changes in cloud9 (when I go back the changes are still there), then I do git commit
and get:
no changes added to commit (use "git add" and/or "git commit -a")
but I just need to commit changes to an existing file not to add. So obviously when I try to git push origin master
there's nothing to push.
I tried with multiple github repos and I get the same result.
What am I missing?
Any help appreciated!
P.S. Oh, btw I suck at git
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该消息显示您没有添加要提交的更改/跟踪文件。
尝试使用
-am
切换到 ADD 并在一次操作中提交:The message shows that you are not adding changed/tracked files to commit.
Try with
-am
switch to ADD and Commit in one operation:Git 将提交与添加更改分开。更改。您首先必须添加要在提交中显示的所有更改:
您现在应该将所有更改都放在 github 上。
或者,您可以进行提交,并在一行中添加/修改,这可能会将不需要的文件包含到您的变更集中。
Git separates committing from adding changes. You first have to add all changes you want to appear in the commit:
You should now have all your changes on github.
Alternatively, you can do the commit, and add/modify in one line, this may include undesired files into your changeset.