# Using Git difftool

**URL:** <https://community.tmpdir.org/t/using-git-difftool/186>\
**Category:** Tools\
**Created:** [December 11, 2020, 2:34am UTC](https://community.tmpdir.org/t/using-git-difftool/186 "2020-12-11T02:34:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbrake](https://community.tmpdir.org/user_avatar/community.tmpdir.org/cbrake/32/3_2.png) [@cbrake](https://community.tmpdir.org/u/cbrake)\
**Post date:** [December 11, 2020, 2:34am UTC](https://community.tmpdir.org/t/using-git-difftool/186/1 "2020-12-11T02:34:22Z")

</div>

Recently I needed to recover some changes in a KiCad PCB file. I had deleted several components to debug a STEP export problem which ended up being a board outline issue. After I fixed the board outline (an imported DXF file had crazy numbers like 50.23812592), I realized I needed to add the deleted components back in. `vim difftool` came in handy:

`git difftool -t nvimdiff`

 ![image](https://community.tmpdir.org/uploads/default/original/1X/65a3f5832ff5ad909e32cc2267f96bf364315dd6.png)

Fortunately, the KiCad file format is very easy to read and diff so I was able to easily recover the changes by navigating to the change I wanted, and typing `diffpu` to put the change into the other window.

You can default to using vimdiff by running [something like](https://stackoverflow.com/questions/3713765/viewing-all-git-diffs-with-vimdiff):

```auto
git config --global diff.tool vimdiff
git config --global difftool.prompt false
git config --global alias.d difftool

```

(in case it is not obvious yet, many of the posts on this site are notes about things I want to remember how to do in the future – feel free to do the same …)
