Skip to main content

git安装与配置

git安装

下载地址:https://gitforwindows.org/

配置文件

配置用户名邮箱

查看当前项目使用的 用户名和邮箱

git config user.name
git config user.email

设置全局 用户名和邮箱

git config --global user.name "你的用户名"
git config --global user.email "你的邮箱"

设置当前项目 用户名和邮箱

git config user.name  "你的用户名"
git config user.email "你的邮箱"

sourceTree安装

下载地址:https://www.sourcetreeapp.com/download-archives
建议下载3.2.6

配置文件

%LocalAppData%\Atlassian
SourceTree.exe_Url_i455h2tnl3mihm45fxe4erbrkzhvrfwv 目录(Url 后面字符串随机)
1.添加accounts.json文件
内容如下

[
{
"$id": "1",
"$type": "SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity",
"IsDefault": false,
"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.Api.Account.Basic.BasicAuthCredentials, SourceTree.Api.Account.Basic",
"Username": "",
"Email": null,
"AvatarURL": null,
"AuthenticationScheme": {
"$type": "SourceTree.Api.Account.Basic.BasicAuthAuthenticationScheme, SourceTree.Api.Account.Basic",
"Value": "用户名/密码",
"Name": "Basic",
"Description": "密码",
"HeaderValuePrefix": "Basic",
"UsernameIsRequired": true
},
"Id": "",
"EmailHash": null,
"DisplayName": null
}
},
{
"$ref": "1"
}
]

2.user.config修改添加

 <setting name="AgreedToEULA" serializeAs="String">
<value>True</value>
</setting>
<setting name="AgreedToEULAVersion" serializeAs="String">
<value>20160201</value>
</setting>