How to Compare Branches in GitHub | Scribe

    How to Compare Branches in GitHub

    • |
    • 0 step |
    • 27 seconds
    Start by opening your terminal or shell.
    CD into your repository.
    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.
    Was this Scribe helpful?
    Save this document for future reference.
    This Scribe is in tip-top shape!Leave feedback if there are any issues with this Scribe