2
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

開発環境作り STEP1: 日本語版VisualStudioCodeでGit連携

Last updated at Posted at 2019-02-04

目的

Gitでバージョン管理して開発する環境を作る。
休日に自宅で&昼休みに会社で、開発を進めてく事を想定しています。
開発ツールにVisualStudioCodeを選んだ理由は、無料&色んな言語に対応している&Gitクライアントになる、から。
※自分の備忘録の意味合いが強いです

前提条件

●OS: Windows10 for 64bit
●ブラウザ: Chrome
●各種バージョン:
→VisualStudioCode1.30.2
→Git2.20.1

VisualStudioCodeをインストール

https://code.visualstudio.com/からVisualStudioCode for Windows 64bitをダウンロードしてインストールを開始
※インストールオプションはデフォルト値でOK(好みで変更可)

VisualStudioCodeを日本語化

VisualStudioCodeを起動

●メニューExtensionsを展開
visualstudio2.PNG

●入力欄にjapanと入力
visualstudio1.PNG

●表示されたJapanese Language Pack for Visual Studio Codeをインストール

Ctrl+Shift+pを押下

●入力欄にconfigureと入力
visualstudio3.PNG

●表示されたConfigure Display Languageを選択

●展開したファイルの"locale":"en""locale":"ja"に修正して更新

VisualStudioCodeを再起動

●メニューが日本語化されている事を確認
visualstudio4.PNG

Gitをインストール

https://git-scm.com/からGit for Windowsをダウンロードしてインストールを開始

●プルダウンでUse Visual Studio Code as Git's default editorを選択
※VisualStudioCodeのインストールが完全に完了していないと選択できないので注意!
※当該画面以外のインストールオプションはデフォルト値でOK(好みで変更可)
visualstudio5.PNG

VisualStudioCodeでGitを設定

VisualStudioCodeを起動し、Ctrl+@を押下し、タブでターミナルを展開

●以下のコマンドを実行して、インストールしたgitのバージョン情報を表示
※エラーが表示されたらGitを再インストールしてみる

コマンド
git --version
結果
git version 2.20.1.windows.1

●メニュー管理を展開
visualstudio7.PNG

●ポップアップで設定を選択
visualstudio8.PNG

●入力欄にgit.pathと入力し、表示されたリンクsettings.jsonで編集を押下
visualstudio9.PNG

git.pathの鉛筆アイコン上で右クリックし、設定にコピーを選択
visualstudio10.PNG

"git.path": nullnullをダブルクォーテーションで囲ったgit.exeのパスに修正して更新
※インストールオプションをデフォルト値にしてある場合は"C:\\Program Files\\Git\\cmd\\git.exe"の筈
※パスのバックスラッシュは要エスケープなので\\で入力しています
visualstudio11.PNG

VisualStudioCodeを再起動し、Ctrl+@を押下し、タブで出力を展開

●プルダウンでGitを選択

●以下の画面になる事を確認
Git~windows.1を使用していますと表示されたらOK
fatal: not a git repositoryとか言われてますが、今回は気にしません
visualstudio12.PNG

メモ

VisualStudioCodeでGitを設定の手順について。
"git.path": nullのままでもGitを検知してたのでやらなくても良いっぽいのですが、なんとなく気持ち悪いので。。。
どなたか明確なデメリット等をご存知なら教えて貰えたら嬉しいです。

2
6
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
2
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?