Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some markdown files but I can't git diff them.

No result at the command line and not supported in gitg (visual git)

Is that possible with the files as they are, without converting them to something else?

share|improve this question
Does this SO answer help? – jasonwryan Jun 13 '12 at 21:57
Is it in a git repository? – caffinatedmonkey Aug 13 '14 at 1:18
up vote 3 down vote accepted

It should work fine; markdown files are plaintext files, so git diff is perfect.

This could be one of a few possible things:

  1. There is no difference in the file (empty output).
  2. The changes to the files have not been added (git add -p *.md)

What does git status say? If it doesn't contain a few lines that say something like "modified: something.md" or "new file: something.md" then you're not going to get a diff.

EDIT: Also, probably a stupid question, but these files are actually in a git repo right? If not, just use Unix's normal diff utility (man diff for more info).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.