Eclipse 首次提交代码到GIT

提交的项目如下:

《Eclipse 首次提交代码到GIT》

《Eclipse 首次提交代码到GIT》

《Eclipse 首次提交代码到GIT》

《Eclipse 首次提交代码到GIT》

《Eclipse 首次提交代码到GIT》

可以看到项目头部出现了NO-HEAD字样

《Eclipse 首次提交代码到GIT》

《Eclipse 首次提交代码到GIT》

《Eclipse 首次提交代码到GIT》

打开git(这边我是用的Coding.net), 选择之前已经创建好的空的项目

《Eclipse 首次提交代码到GIT》

点击红框里的按钮复制仓库连接地址。

《Eclipse 首次提交代码到GIT》

将复制好的仓库地址粘贴到URI中,Host与Path会自动填充。接下来只要将User与Password填写完整就好了,User与Password是登录git的用户名与密码。

《Eclipse 首次提交代码到GIT》

《Eclipse 首次提交代码到GIT》

点击Finish,要求再次输入用户名与密码

《Eclipse 首次提交代码到GIT》

这时候进行一次拉取代码操作

《Eclipse 首次提交代码到GIT》

出现以上界面则表示代码已经上传成功了。

《Eclipse 首次提交代码到GIT》

此时项目头上出现一个向上的尖头,表示有待提交的代码,再次commit

《Eclipse 首次提交代码到GIT》

 

《Eclipse 首次提交代码到GIT》

点击Commit and push

《Eclipse 首次提交代码到GIT》

到目前为止,首次提交代码到git已经完成了!可以去git上验证下

《Eclipse 首次提交代码到GIT》

 

    原文作者:JJC001
    原文地址: https://blog.csdn.net/edc0228/article/details/78075028
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞