一、下载
官网下载地址:https://product-downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-3.3.9.exe
二、安装
1.下载安装git程序
2.安装SourceTree
- 双击【SourceTreeSetup-3.3.9.exe】安装包,进入登录或注册bitbucket界面;
- 关闭上图窗口,【Win+R】打开运行输入【 %LocalAppData%\Atlassian\SourceTree】后回车,进入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
}
]
- 返回上一级目录,进入SourceTree.exe_Url_ogs11ki54vn2dsxavumebbwpukztw4cq\3.3.9.3870,编辑【user.config】文件,添加如下内容:
<setting name="AgreedToEULA" serializeAs="String">
<value>True</value>
</setting>
<setting name="AgreedToEULAVersion" serializeAs="String">
<value>20160201</value>
</setting>
- 再次双击【SourceTreeSetup-3.3.9.exe】安装包,出现如下对话框,选择【我不想使用Mercurial】即可完成安装;