3

I am using ubuntu 14.04 and before pushing the code, I used to run command git diff so that I can know what changes I made in the code.

Then someone told me, I should use meld for resolving merge confilcts.

I am not able to resolve any conflicts nor able to use git diff anymore, because meld is too complicated. So I want to restore back the old git diff.

I am getting this error when I do git diff.

Usage: 
  meld                        Start with an empty window
  meld <file|dir>             Start a version control comparison
  meld <file> <file> [<file>] Start a 2- or 3-way file comparison
  meld <dir> <dir> [<dir>]    Start a 2- or 3-way directory comparison
  meld <file> <dir>           Start a comparison between file and dir/file

meld: error: too many arguments (wanted 0-3, got 7)
external diff died, stopping at app/Plugin/Community/Controller/CommunitiesContr

All I want to see is the difference of code edited by me from the original, so that I can verify the changes before pushing.

T. Junghans
  • 11,385
  • 7
  • 52
  • 75
user1735921
  • 1,359
  • 1
  • 21
  • 46

1 Answers1

1

have you tried git difftool?

git difftool --tool=meld yourfile

I found an answer here that describes how to configure difftool to use meld as default tool.

In short:

  1. Open your git configuration file (usually ~/.gitconfig on linux)
  2. and enter the following sections:

    [diff]
      tool = meld
    [difftool]
      prompt = false
    [difftool "meld"]
      cmd = meld "$LOCAL" "$REMOTE"
    
  3. Now you can call git difftool yourfile

The link above also describes how to configure meld as default merge tool.

Community
  • 1
  • 1
BooFar
  • 857
  • 1
  • 8
  • 15