Joh*_*dol 9 git github cloud9-ide
我试图将一些更改从cloud9推送到github存储库,但我遇到了障碍.
我可以用ssh克隆OK,一切似乎都没问题,我做了我的更改,保存了cloud9中的更改(当我返回更改仍然存在时),然后我做到了git commit
:
no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)
但我只需要对现有文件进行更改而不添加.很明显,当我尝试git push origin master
没有什么可以推动的时候.
我尝试了多个github repos,我得到了相同的结果.
我错过了什么?
任何帮助赞赏!
PS哦,顺便说一句,我很傻
Sar*_*raz 17
该消息表明您没有添加已更改/跟踪的文件进行提交.
尝试-am
在一个操作中切换到ADD和Commit:
git commit -am "your message goes here"
git push
Run Code Online (Sandbox Code Playgroud)
Git将提交与添加更改分开.首先,您必须添加要在提交中显示的所有更改:
#1: Add any new files as part of the commit
# or use git add -p to interactively select hunks to stage
git add file1 file2 …
#2: Commit to local
git commit -m "Commit message goes here"
#3: Push your commit/changes to the host (github)
git push
Run Code Online (Sandbox Code Playgroud)
您现在应该在github上进行所有更改.
或者,您可以执行提交,并在一行中添加/修改,这可能包括您的变更集中的不需要的文件.
#1 Add files commit to local
git commit -a -m "Commit message goes here"
#2 Push your commit/messages to the host (github)
git push
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
13547 次 |
最近记录: |