LoginSignup
0
1

More than 1 year has passed since last update.

VSCodeとGitの連携方法

Posted at

概要

  • VSCodeからGitを使えるようにした際の備忘録
  • VSCodeとGit連携しておくと、Gitのコマンド入力(Pull/Push..etc)やブランチのチェックアウトが簡単にできるので便利◎

環境

  • Windows10 Home x64-based PC
  • Ubuntu 20.04.2 LTS
  • git version 2.32.0.windows.1
  • Visual Studio Code ver:1.57.1

実施内容

1.Gitインストール

  • ↓の手順でGitをインストール

  • ↓のコマンドを実行 (Ubuntu上で実行した)
git config --global user.name {ユーザー名}
git config --global user.email {メールアドレス}

2.VSCodeインストール

↓のリンクからVisual Studio Codeをインストール

3.連携

  • 任意のフォルダをVSCodeで開く
  • Ctrl+Shift+@ でターミナルを開く
  • ターミナルでgit initを実行
  • 実行結果
    PS C:\Users\~~> git init
    Initialized empty Git repository in C:/Users/~~/.git/
    
  • 左下に↓のようにBranch名が表示されていればOK
    image.png

0
1
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
1