LoginSignup
0
0

More than 3 years have passed since last update.

GitLensでAzure DevOps Serverと高度な統合を行う方法

Last updated at Posted at 2021-01-14

概要

  • Visual Studio CodeのGitLensでAzure DevOps Server(TFS)と高度な統合を行う手順
  • 既定ではGitLensでAzure DevOps Serverに対して、Webサイトの参照や、Remote URLのコピー、VSCodeで編集しているファイルの別のブランチのバージョンをブラウザで開くことなどができない

手順

  1. VSCodeの設定で「GitLens Remotes」を検索し、「settings.jsonで編集」を選択します。

  2. 以下を記述します。

    ドメイン名がtfs-server-name:8080の場合

    {
        "gitlens.remotes": [{
            "domain": "tfs-server-name:8080",
            "type": "Custom",
            "name": "My Company",
            "protocol": "https",
            "urls": {
                "repository": "http://tfs-server-name:8080/${repo}",
                "branches": "http://tfs-server-name:8080/${repo}/branches",
                "branch": "http://tfs-server-name:8080/${repo}?version=GB${branch}",
                "commit": "http://tfs-server-name:8080/${repo}/commit/${id}",
                "file": "http://tfs-server-name:8080/${repo}?path=${file}${line}",
                "fileInBranch": "http://tfs-server-name:8080/${repo}?path=${file}&version=GB${branch}${line}",
                "fileInCommit": "http://tfs-server-name:8080/${repo}/commit/${id}?path=${file}${line}",
                "fileLine": "&_a=contents&line=${line}",
                "fileRange": "&_a=contents&line=${start}&lineEnd=${end}"
            }
        }]
    }
    
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0