Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
2  
Does this SO answer help? –  jasonwryan Jun 13 '12 at 21:57
    
Is it in a git repository? –  caffinatedmonkey Aug 13 at 1:18

1 Answer 1

up vote 2 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

 
discard

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.