How to Compare Branches in GitHub | Scribe

    How to Compare Branches in GitHub

    1
    Start by opening your terminal or shell.
    2
    CD into your repository.
    3
    Enter the git diff command in the following format: git diff main..second-branch [[Enter]] Type git diff, followed by the name of your first branch, two dots, and the second branch. The resulting output is a comparison of the two branches.