要在windows 10环境下使用sourcetree 3.2.6和git 2.32.0进行操作,首先需要完成以下步骤:
首先,下载并安装Git。您可以从Git的官方网站下载最新版本:
接下来,下载SourceTree 3.2.6:
为了在GitLab中使用SourceTree,您需要生成一个SSH密钥。使用以下命令在Git Bash中生成SSH密钥:
ssh-keygen -t rsa -b 2048 -C "gitlab中账户的邮箱地址"
SourceTreeSetup-3.2.6.exe文件,弹出安装窗口后,立即关闭窗口。
accounts.json文件:按
Windows+R调出运行框,输入
%LocalAppData%\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": "atlass
ian account" }, "BaseUrl": "https://id.atlassian.com/" }, "Credentials": { "id": "4", "type": "SourceTree.Model.BasicAuthCredentials, SourceTree.Api.Account", "Username": "", "Email": null }, "IsDefault": false }]user.config文件:再次按
Windows+R,输入
%LocalAppData%\Atlassian\SourceTree\,进入
3.2.6.3544文件夹,找到
user.config文件。用记事本打开该文件,在
标签内添加以下内容:
20160201
SourceTreeSetup-3.2.6.exe文件,弹出窗口后,选择“我不想使用Mercurial”选项,完成安装。
通过以上步骤,您可以在Windows 10上成功安装并配置SourceTree 3.2.6和Git 2.32.0,并跳过注册过程。