Search code examples
gitgithubgit-commit

How to visually see diff between two git commits on github


I understand I can run a git command locally to see them in the terminal, but I want to see them visually on github. Is this possibly?

I want to be able to see the diff between two commits, NOT two branches.


Solution

  • Yes - you can compare two commits via the compare UI:

    https://github.com/orgname/reponame/compare/<hash1>...<hash2>
    

    You can find the hash values by visiting the Commits tab and copying the commit hash for each commit you're interested in.