git init git remote add origin git@code.aliyun.com:account/TestProject.gi git add . git commit -am "message" git push -u origin master |
如果提示:error: failed to push some refs to 'git@code.aliyun.com:account/TestProject.gi'
则:
git pull --rebase origin master |
其中“git@code.aliyun.com:account/TestProject.git“为阿里云code项目的SSH,在项目界面可以看到。message为本次提交的信息。
出现类似上图所以消息则推送已成功。项目有修改时只需要在git bush中依次add,commit,和push即可。至此我们就成功在云端建立了一个项目并将本地的项目推送了上去,之后我们在另一台pc上要编辑项目时只需将项目从云端pull下来即可,相关教程和git的一些常用指令将在下一章进行讲解。