HBuilder git使用教程

1.插件安装

打开HBuilder,工具->插件安装。

HBuilder git使用教程HBuilder git使用教程
等待安装,成功后提示重启后生效,立即重启。

2.在码云上新建一个项目,复制项目地址。

码云地址:https://gitee.com/
HBuilder git使用教程
HBuilder git使用教程

HBuilder git使用教程

3.打开HBuilder导入git项目。

HBuilder git使用教程

HBuilder git使用教程

HBuilder git使用教程
下一步选择master分支(一般项目开发时不拉取master分支),之后就是下一步下一步。

HBuilder git使用教程

HBuilder git使用教程
HBuilder git使用教程

tip:如果创建项目的时候没有给默认的文件的话,在下一步会提示没有project.
 这时候就上一步,选择Use the New Project wizard.直接完成,选择要创建的项目去新建。

HBuilder git使用教程

新建的项目名称与码云上的项目名保持一致。

4.本地项目与码云上的项目关联,项目名右键选择team->共享项目
HBuilder git使用教程

HBuilder git使用教程
点击Create Reponsitory 完成。
关联成功状态如下。

HBuilder git使用教程
5.关联成功后代码上传。
在index.html里面写点内容,查看是否上传成功。
先上传到本地,右键工程Team->Commit

HBuilder git使用教程

HBuilder git使用教程
commit成功,在push到码云上。右键项目Team->Remote->Push.

HBuilder git使用教程


HBuilder git使用教程

提交成功后到码云项目上看看是否有index.html文件。
HBuilder git使用教程
点开index.html,看到刚才写的一句话,大功告成!
HBuilder git使用教程



最后一句话:
      git代码版本管理的平台有很多个。操作都大同小异,相信你们也会了怎么上传代码到gitHub上了吧。