emahiro/b.log

Drastically Repeat Yourself !!!!

GoLandの設定をremoteで管理する

Golandの設定をremoteで管理したかったので、その設定方法をメモとして書いておきます。

背景

PC変えたりすると使っていたPCの設定が全て初期化されて1から作り直すのめんどくさいです。
PCやeditorくらいであればもしかしたら、設定ファイルをgithub等にあげて clone してくれば設定完了みたいなことはしていましたが、jetbrains系のIDEの設定までremoteで管理していなかったので、この機会にGoLandを使ってIDEのremoteめsettingをsyncの方法を記載します。

ツール

  • Settings Repository (Browse Jetbrains Plugin)
  • GithubのAccessToken (Settings -> Developer Applications -> Personal access token)

の2点を利用します。

手順

Settings Repository をDLしてきます。
Plugin -> Browse Jetbrains Plugin から Settings Repository をinstallします。

f:id:ema_hiro:20171125031928p:plain

次にGithubのAccessTokenを取得します。
個人のGithubのアカウントを作成しておき
* Settings -> Developer applications -> Personal access token に遷移してGoLand用にアクセストークンを取得します。

GoLandに戻ってきたら Settings Repository を起動します。
GithubリポジトリのURLとaccess token の入力を求められるので、上記手順で取得したgithubaccess tokenを入力します。

適当なプロジェクト開いて
「File」 -> 「Settings Repository」 に遷移します。

f:id:ema_hiro:20171125032249p:plain

この時に以下のようなwindowが表示されるので Override local でローカルを上書きします。

f:id:ema_hiro:20171125032420p:plain

※ どうも一度目は Override local をしなければならないみたいです。

あとはaccess tokenによってremoteで接続すべきGithubのレポジトリも繋がっているので、IDEを終了したタイミングでgithub上に作成したremoteのリポジトリと設定がsyncされます。
これで他端末でも同じ設定が使えます。

refs

Sharing Your IDE Settings - Help | IntelliJ IDEA

qiita.com