Sourcetree配置及跳过账户登录

新版本Sourcetree必须使用账户登录,但是又不想登录,怎么办?

  1. 先启动下Sourcetree(应该这一步不操作也会成功,但是有些人说不成功)

  2. 找到安装目录

    %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": 
       {
         "$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
     }
    ]
  3. 启动Sourcetree,成功

  4. 使用GIT

    sourcetreegit.png

标签: git sourcetree

发表评论: