LoginSignup
10
5

More than 5 years have passed since last update.

【メモ】VSCode(mac)でファイルの差分を確認・修正する

Last updated at Posted at 2019-01-17

Githubなどで色々修正が入ってしまったファイルと手元の作業ブランチ等のファイルの差分を確認しマージする。

1、VSCodeで比較したいファイルを開く(新規ファイルを追加してGithubなどからコードを貼り付ける)
2、command+shift+Pでコマンド入力ウインドウを出し、compareと入力すると画像のようにコマンド候補が出ますので選ぶと比較したいファイルの候補が出てきますので選択。
スクリーンショット 2019-01-17 15.23.52.png

3、画像のように2分割で比較できます。
スクリーンショット 2019-01-17 15.17.56.png

「・・・」ボタンをクリックし、「並べて表示に切り替え」を選ぶと1枚のファイルに表示されますので、好きな方で編集してください。
スクリーンショット 2019-01-17 15.19.04.png
スクリーンショット 2019-01-17 15.19.17.png

10
5
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
10
5