git操作方便,簡單使用的客戶端sourcetree 安裝配置所遇問題總結


常言道:工欲善其事,必先利其器。

SourceTree是老牌的Git GUI管理工具了,也號稱是最好用的Git GUI工具 這里先言言它的好:

* 免費
* 功能強大:無論你是新手還是重度用戶,SourceTree 都會讓你覺得很順手。對於非常重度用戶,Source Tree還支持自定義腳本的執行。
* 同時支持 Windows 和 Mac 操作系統,(而且在 Windows 環境下,SourceTree是多語言的)
* 同時支持 Git 和 Mercurial 兩種 VCS
* 內置GitHub, BitBucket 和 Stash 的支持:直接綁定帳號即可操作遠程repo

總的來說,好不好 適合自己最重要

這里記錄安裝所遇的問題,已經解決,希望可以幫到大家;

SourceTree版本1.5.2及以下的老版本,安裝可直接參考 百度經驗 (SourceTree 安裝教程)[http://jingyan.baidu.com/article/3c48dd3465636be10ae3584a.html]

1

SourceTree 安裝之后需要使用賬號登陸以授權,以前是可以不登陸的,但是現在是強制登陸。

* 現在是強制登陸,需要license agreement,得登錄賬號,如果你有google賬號,那就十分方便;
* 其次,你可以注冊 並使用Atlassian  賬號,(難,跟在國內翻牆注冊Google賬號差不多);

** 所以我們就得想辦法跳過初始設置,免登錄**

方法: 1. 找到SourceTree配置目錄一般位於:C:\Users\Administrator\AppData\Local\Atlassian\SourceTree,(即便你安裝在其他盤符里);
2. 新建(或修改)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
  }
]

然后關閉,重啟運行即可生效(已然跳過初始設置);

1-1

有朋友向小超反映自己照方法操作還是跳不過初始設置,小超告訴你,不存在的,方法親測的,如果真的失敗了,試試下下面這種:

  1. 首先,安裝完 SourceTree 以后先運行一次,彈出初始化登錄頁面后退出。

  2. 打開 我的電腦,在最上方的地址欄直接輸入以下地址:

%LocalAppData%\Atlassian\SourceTree\

  1. 在這個目錄下新建一個名為 accounts.json 的文件。

  2. 使用文本文檔 打開這個文件,將以下內容復制到其中后保存。

[
  {
    "$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
  }
]

  1. 再次打開 SourceTree 就可以直接跳過登錄進入軟件頁面了。

注意: Windows 系統文件后綴是默認隱藏的,需要先顯示文件的后綴名,然后隨便新建一個 文本文檔 ,將文件全名改為 accounts.json 即可。

2

要想ssh私鑰和Linux下的通用,要將SourceTree一般選項下的SSH Client類型改為OpenSSH。

3

鏈接網站:
(SourceTree官方說明文檔)[http://www.unlimax.com/sourcetree.html]
(SourceTreez下載地址)[ https://www.sourcetreeapp.com/]


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM