1

When I try to use "git difftool", the terminal seems to enter a mode where hitting the "enter" key outputs ^M instead of accepting the default option:

$ git difftool --tool=tkdiff file

Viewing (1/1): 'file'
Launch 'tkdiff' [Y/n]: ^M^M^M^M^M^M^M^M

I can control-c out of it, but I can't get difftool to work.

"git diff" works like a charm.

I am struggling to Google for this problem.

I am running Ubuntu 14.04.2 LTS, my TERM is xterm, and my .gitconfig is very simple, it has nothing about output in it:

[user]
        name = My Name
        email = myemail@example.com

[alias]
        co = checkout

How can I use "git difftool"?

dfrankow
  • 20,191
  • 41
  • 152
  • 214

1 Answers1

1

Probably a terminal configuration problem rather than a git issue. Run stty sane to see if that helps or follow other instructions in this similar post: https://askubuntu.com/questions/441744/pressing-enter-produces-m-instead-of-a-newline

Community
  • 1
  • 1
jotadepicas
  • 2,389
  • 2
  • 26
  • 48
  • 1
    stty sane worked. Thank you! I am so surprised, since the terminal otherwise seemed to be working fine. – dfrankow Jun 14 '15 at 03:38
  • Great! Haven't had this particular error myself but I'll keep a bookmark to you question just in case he he... – jotadepicas Jun 14 '15 at 03:51