背景简介
由于公司代码服务器在内网,而自己又经常在客户方开发,使用SVN等集中式版本管理根本没法玩。无意间了解到了GIT这个版本管理工具,她的分布式功能完美符合要求。但用惯了SVN,一时半会还不能完美切换到命令行的操作模式,急需一个可视化工具。目前主流的主要有:TortoiseGit 以及 SourceTree 。本文主要讲SourceTree安装。
一些说明
- Windows版本:win10专业版 64位
- SourceTree版本:2.3.1.0
- GIT版本: 2.12.2
- 本文主要讲如何跳过Atlassian账户验证
- 第一次启动会询问你是否使用Mercurial,因为我目前只用到GIT,所以选择“我不想使用Mercurial”即可。
安装步骤
STEP1.创建account.json
手工创建文件 %USERPROFILE%\AppData\Local\Atlassian\SourceTree\accounts.json 并录入以下内容
[
{
"$id": "1",
"$type": "SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity",
"Authenticate": true,
"HostInstance": {
"$id": "2",
"$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountInstance, SourceTree.Host.AtlassianAccount",
"Host": {
"$id": "3",
"$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountHost, SourceTree.Host.AtlassianAccount",
"Id": "atlassian account"
},
"BaseUrl": "https://id.atlassian.com/"
},
"Credentials": {
"$id": "4",
"$type": "SourceTree.Model.BasicAuthCredentials, SourceTree.Api.Account",
"Username": "",
"Email": null
},
"IsDefault": false
}
]
STEP2.安装
双击安装文件SourceTreeSetup-2.3.1.0.exe开始安装
STEP3.授权
此时如果你完成了STEP1,这里无需任何操作; 如果不做STEP1,则需要你登录Atlassian或者google账户
STEP4.远程仓库设置
此处无需设置远程仓库,直接选择跳过初始设置即可