How to compare two different commits on the same branch in github?

前端 未结 5 1365
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 04:09

Comparing histories on the same branch is very confusing for me on GitHub. I struggle with this regularly:

If I use compare/master in the URL after the

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-29 04:31

    to see the difference between branches or tags

    (branches if no pull request has been made)

    • https://github.com/PyCQA/mccabe/compare/bug/39...master (diff between two branches bug/39and master)
    • https://github.com/PyCQA/mccabe/compare/0.6.0...0.6.1 (diff between two tags)
    • https://github.com/PyCQA/mccabe/compare/0.6.1...master (diff between tag and master)

    Notes:

    • (if a pull request has been made you can see the changes inside the PR, no longer via the compare url)

    • You can use the dropdowns to select different branches or tags:

    • take care of the order, eg. https://github.com/PyCQA/mccabe/compare/master...0.6.1 will give no results

    • you can choose between 2-dot (..) or 3-dot (...) notation

    to see the difference between commits:

    • https://github.com/PyCQA/mccabe/compare/55942cb...HEAD

    • https://github.com/PyCQA/mccabe/compare/55942cb...e92e9e7

提交回复
热议问题