2

I'm getting the error shown on the image below after running gitk command on Git Bash shell and browsing my diffs on gitk gui tool.

enter image description here

The problem is that I can't find the stale gitk-tmp file this dialog is referring to. I've looked for the path ~/.config/git/gitk-tmp both on the project root folder and on the Git Bash installation folder, but couldn't find it in any of these locations.

I've also configured hidden folders to be shown on windows explorer to make sure that I would see them if they were hidden, but also with no luck. For example, there's a hidden folder called .git inside the project root folder, but there's no "gitk-tmp" file inside it either.

Could anyone please give me a hand on finding and removing this "gitk-tmp" file so that the error shown in the image won't happen anymore? Thanks.

Ulysses Alves
  • 2,297
  • 3
  • 24
  • 34
  • 1
    "~" means home directory, so it should mean "%HOME%\.config\git\gitk-tmp", if you have the environment variable HOME defined. – max630 Sep 27 '17 at 22:37

2 Answers2

4

As max630 mentioned, ~ means the home directory on your machine.

Such as if you are using windows OS, then you should go to C:\Users\username\.config\git directory to find the gitk-tmp file and delete it. And make sure the C:\Users\username\.config\git directory only has the file gitk.

enter image description here

Marina Liu
  • 36,876
  • 5
  • 61
  • 74
  • 2
    Thanks, Marina. I will accept your answer but with just one remark: I had to delete both `gitk` and `gitk-tmp` files. When I delete only `gitk-tmp` file, I start to get another ugly error, but deleting both files solves everthing. I think these two files are somehow syncronized by "Git for windows", and that's probably the reason why they need to work as a pair. – Ulysses Alves Sep 28 '17 at 12:13
0

Nowadays I don't use gitk anymore, having thus replaced its usage by Tortoise for Windows. I still use git bash because I like to type git commands and see them on the command prompt rather than using a GUI tool.

So, kind of a work around for my original question, after three years of stumbling with this problem I don't face it anymore because I think it's more productive to use a combination of git bash to write git commands + Tortoise Git to view file diffs and resolving merges.

Ulysses Alves
  • 2,297
  • 3
  • 24
  • 34