Skip to main content

WinMerge のセットアップと使う方

WinMerge は、Windows 用のオープン ソースの差分およびマージ ツールです。WinMerge は、フォルダーとファイルの両方を比較し、違いを理解して扱いやすい視覚的なテキスト形式で表示します。この記事でWinMerge のセットアップと使う方を教えます。

WinMerge
source: https://winmerge.org

WinMerge をダウンロード

WinMerge のウェブサイトに行って、「WinMerge-2.16.44-x64-Setup.exe」ボタンを押し、WinMerge 2.16 をダウンロードしてください。

download_page

WinMerge をインストール

ダウンロードされたソフトウェアをクリックし、ポップアップ画面で「Next」を押してください

install1

「Languages」部分をスクロールダウンし、「Japanese menus and dialogs」を選択し、「Next」ボタンを押してください

install2

install3

ターミナル等からも WinMerge をアクセス出来ようにする為に「Add WinMerge folder to your system path」オプションを選択し、希望によって他のオプション選択してください

install4

「Enable Explorer context menu Integration」オプションを選択したら、フォルダ/ファイルを右キリックし、コンテクストメニューから WinMerge を開くようになります。

install5

「Install」ボタンを押し、「Next」ボタンを押し、その後、「Finish」ボタンを押してください

install6

install7

install8

言語を日本語にする

もし WinMerge の言語が日本語じゃなくて、英語なら、「Edit」タブから「Options」を押してください。

options1

ポップアップ画面で右側の下にある「Languages」と言うドロップダウンメニューから日本語を選択し、「OK」ボタンを押してください

lang2

WinMerge を使う方

「ファイル」タッブから「開く」を押し

use1

参照ボタンを押し、比較したいフォルダ・ファイルを指定

use2

比較したいフォルダを指定する方法:

ポップアップ画面から対象のフォルダーを選択し、「Open」を押してくだい

use4

何も選択しないで、「Open」を押してくだい

use5

右側下にある「比較」ボタンを押し

use3

今 WinMerge を使えます。でも、もっと効果的に使う為にちょっとカスタマイズしましょう。

WinMerge をカスタマイズ

「表示」タッブから「右側のみに存在する項目の表示」を選択し、「同一項目の表示」を選択解除してください

customize1

「ツール」タッブから「列の設定」を選択

customize2

「追加プロパティ」を押し

customize3

ファイル名とフォルダのパスを右側にして、OK を押し

customize4

下に見せられているように 11 項目を選択し、「OK」を押し

customize5

比較の例

タスク: プロジェクトのソース コードを 11 月から 12 月まで比較し、何が変更されたかを確認

11月のソースコード:

11

12月のソースコード:

12

実際は違いは 5 つあります(以下のリストをご覧ください)。WinMerge を使用してそれらを見つけてみましょう。

  1. 両方でもある「subfolder1」フォルダで12月のバージョンでは以下の5つファイルを削除された:

    • file1.txt
    • file2.txt
    • file5.txt
    • file7.txt
  2. 両方でもあった「extra」フォルダが12月のバージョンでは削除された

  3. 12月のバージョンでは新しい「folder_12月」と言うフォルダと中に以下の三つのファイルが作成された:

    • 12月_file1
    • 12月_file2
    • 12月_file3
  4. 両方でもある「subfolder2」フォルダに12月のバージョンでは以下の新しいファイルが作成された

    • react.tsx
  5. 両方でもある「subfolder3」フォルダに12月のバージョンでは以下の二つのファイルが更新された

    • main.py
    • deselect.html

比較:

11 月のフォルダは「左側」、 12 月のフォルダは「右側」です。

compare1

ファイルの内容の違いさを見る為にファイル名を押したら、両方のバージョンが開かれて、違う部分の行と分がハイライトされます。

compare2

CSVのレポートを出す

比較の後、「ツール」タッブから「レポートの生成」ボタンを押し

csv1

CSV ファイルを保存したい場所を指定し、ファイルの形を CSV にして、「OK」ボタンを押してくだい

csv2

WinMergeに関しましてもっと情報を以下のページであります。
https://manual.winmerge.org/jp/

以上です。この記事を読んでくれてありがとうございました。

Comments

Popular posts from this blog

Introduction to SQLFluff: How to make your SQL code clean and error-free

Image by Jake Aldridge from Pixabay You know oftentimes, the cause of runtime or compile errors and hours of debugging agony is all due to simply a missing semicolon. Have you ever had such experience? If you had, you are not alone. There are two ways to avoid these unfortunate situations: either become a perfect developer who never makes mistakes, or use helpful tools such as linters that can catch these errors early on. I am nowhere near being a perfect developer who never makes a mistake. In fact, I'm probably the opposite of a perfect developer, so even if I wanted to, I wouldn’t be able to teach you how to become a perfect developer. But what I can teach you is using linters. A Wikipedia defines a linter as a "static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs." If you're not convinced yet on using linters, consider this scenario: in a large project with multiple members, different people tend to ...

Git squash merge explained

There are many ways to integrate changes in git: regular / normal git merge, git squash merge, git rebase etc. This article explains git squash merge by comparing it to regular merge. Let’s use below example: In the repository with default main branch, after two commits, a new feature branch is created. Some work happened in feature branch. feature branch now has 2 commits that it shares with main branch, and three exclusive commits (exists only in feature branch). In the meantime, others worked on main branch and added two new commits (exists only in main branch). git log output of the main branch: c72d4a9 ( HEAD - > main ) fourth commit on main 2c3dd61 third commit on main 0c2eec3 second commit on main 9b968e8 first commit on main git log output of the feature branch: 786650f ( HEAD - > feature ) third commit on feature 21cbaf1 second commit on feature 677bc7f first commit on feature 0c2eec3 second commit on main 9b968e8 first commit on mai...