Differences between two versions of the same file in nonadjacent commits in git

Let’s say I have a repository with some commits:


Let’s say it has a file called 1.file

  • “git cherry” shows an already cherry-picked commit as “ready to be applied”
  • Is there a better way of doing a git stash pop and then discard the stashed changes if I don't merge?
  • How do you make Git ignore files without using .gitignore?
  • Eclipse Oxygen & org.eclipse.jface giving NullPointerException dialog
  • github desktop merge commit hiding comments
  • How to in Git, clone a remote (GitHub) repository from a specifed date
  • Let’s say it looks like this across the various commits:







    Can I somehow view the differences between the latest-commit and some-old-commit versions of 1.file (preferably on github) and have the line c=3; marked as new, while what went on with b would be left out (as it’s irrelevant).

    This seems like something basic, but I wasn’t able to achieve the desired result.

  • Git global ignore not working
  • “git rm --cached x” vs “git reset head — x”?
  • github fork : your branch is 5 commits ahead how to clean this without pushing
  • Why does “git clone” not take a refspec?
  • Label Git repository in AppVeyor build using environment variable
  • Any command to store Git username password without inital prompt
  • One Solution collect form web for “Differences between two versions of the same file in nonadjacent commits in git”


    git diff some-old-commit..latest-commit -- 1.file

    You’d not be able to run this on github so first fetch from github in your local repository.

    Git Baby is a git and github fan, let's start git clone.