1

If I run git diff and have several files changed I find I get one long listing of the diffs with no clear separation between one diff and the next.

Is there any way to highlight the first line of a diff or have some visual marker between diff hunks?

3
  • 2
    like stackoverflow.com/a/28505651/6309? Commented Feb 15, 2015 at 19:31
  • you can always use git add -p to choose specific hunks Commented Feb 15, 2015 at 19:32
  • 1
    Take a look at git difftool in combination with a graphical diff viewer like kompare or kdiff3. Commented Feb 15, 2015 at 19:44

1 Answer 1

2

The easiest way that I found is to use a difftool.

I use meld. To start using it properly:

  • install meld
  • configure meld as your default difftool

    git config --global diff.tool meld

  • navigate to a git repository and start digging

    git difftool

You will then see a diff for each file separately

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.