Super User is a question and answer site for computer enthusiasts and power users. 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 run a git pull and see that a file has changed. I would like to see a line by line difference of what has been added or removed.

I tried git diff 12345..67890 , (newest commit)..(second newest commit) , but the output showed a lot of additions where there is stuff missing from the file currently.

What am I doing wrong?

share|improve this question

I had it backwards it goes

git diff (second newest or even older commit)..(the newest or newer commit)

If you just want to see what changes since a commit you pulled in you can run

git diff (second newest or even older commit)
share|improve this answer

Using git whatchanged --patch will show you what files have changed, along with the actual line changes. You can get similar results from the --patch flag with git-log, git-diff, and others--the flag isn't consistently documented on each sub-command, but it is generally available anywhere you'd get log output.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .