Search code examples
pythongithubcomparebranch

How to compare two python files with the same name in different branches in GitHub?


I have 2 versions of a Python code (python files with the same name) in 2 different branches in GitHub.

How can I compare these files in GitHub?

I am aware of git diff command but I am looking for a way to compare files in the repository user interface (instead of using git commands in the terminal).


Solution

  • You can compare the branches which will show any diffs:

    https://github.com/<user>/<repo>/compare/branchA...branchB