本人认为sourceTree 是最好用的版本管理工具,下面将讲解下sourceTree 客户端工具 克隆,提交,推送 具体使用过程,废话不多说直接上图。
使用步骤:
首先必须要先安装Git和sourceTree,如何按照参考其它文章,本文章之讲解有关如何使用sourcetree。
1.注册登录github 或者 gitee,创建项目仓库。(已有账号,项目忽略第一步。)

之后
接下来

2.复制项目地址, 打开sourcetree,点击clone,如下图。

3.填入远程仓库地址,目标路径(本地存放路径),点击克隆。
4. 打开目标路径,看到已克隆一个空白的版本库。在目标路径下新增文件test1.txt


5.提交和推送。由于git是分布式版本控制工具,存在着本地仓库和远程仓库,所以我们在本地工作副本进行的编辑,要先提交到本地仓库,再从本地仓库推送到远程仓库。下面进行演示。第7步中编辑完成后,打开sourceTree, 可以看到文件的变动已经显示到软件界面,点击暂存所选,类似于勾选要提交的文件。
6.提交注释

7.提交完成后,可以看到日志/历史选项卡中已显示提交的版本日志,在master分支 提交了新增1,不过这个master分支是本地仓库的,并不是远程仓库的。从第二张图可以看到远程仓库github里还是空白的。


8.点击推送,勾选将本地master分支推送到远程master分支,点击推送


9.推送完成后,可以看到最新的版本里显示了master 和 origin/master,这表明本地master分支和远程master分支是同步的,在一个节点上。


以上就是代码 克隆,提交,推送的全部使用过程,下文将讲解代码 获取 和 拉取(基于sourceTree的使用)。