TortoiseGit是一个开放的git版本控制系统的源客户端,只运行于Windows系统中,与操作系统紧密结合,使用起来非常方便。如果有TortoiseSVN的使用经验,则使用TortoiseGit很容易上手。
内网下载地址:
http://172.20.8.10/Tools/TortoiseGit-2.9.0.0-64bit.msi #安装包
http://172.20.8.10/Tools/TortoiseGit-LanguagePack-2.9.0.0-64bit-zh_CN.msi #中文语言包
准备工作
在使用TortoiseGit之前,需要设置与远端仓库通信的SSH密钥信息。
由于安装的时候,选择使用的SSH客户端是TortoiseGitPlink,所以其不能和msysgit共享SSH密钥对,需要单独设置。
- 运行TortoiseGit开始菜单中的PuTTYgen程序,创建RSA密钥对,然后保存。

- 运行TortoiseGit开始菜单中的Pageant程序,并添加上一步中保存的私钥。

- 将密钥对中的公钥,添加到github账号中,以供TortoiseGit与Github的SSH通讯加密验证所用。
克隆远端仓库
在需要创建本地版本库的目录(D:\tortoise)上右键,选择
Git Clone...

如果SSH密钥对准备工作正确完成,并且Pageant程序在运行中,则根据你的网络状况,很快远端版本库就克隆到本地了。

常用操作
在克隆回来的本地仓库上进行日常的版本控制操作,以测试是否能正确使用。
修改文件
修改文件后,在修改的文件上右键选择
Git Commit
,在弹出的对话框中,填写提交日志,完成提交,即可将本次修改提交到本地库。

推送到远端仓库
如果本地修改完毕,则可以将本地仓库推送到远端仓库。

完成推送。

当然,本地版本库,并不区分是怎么克隆回来的。用TortoiseGit克隆回来,用Git Bash命令行,一样可以正常使用。只是两种工具使用的密钥对不是同一个。只要远端github中同时存放了他们的公钥,则都能正常混合使用
网友评论