Meaning of Github Ahead/Behind Metrics

后端 未结 4 1651
予麋鹿
予麋鹿 2020-12-04 15:02

In plain language (hopefully with a simple example), what do the ahead/behind metrics on a Github repo\'s branch mean?

And what are the implications for that branch

4条回答
  •  甜味超标
    2020-12-04 15:50

    If you're more of a visual type, take a look here:

    ◈ - ◈ - A - ◈ - B
          \
            ◈ - C
    

    A is 2 commits behind and 0 commits ahead of B
    B is 0 commits behind and 2 commits ahead of A
    C is 1 commit behind and 2 commits ahead of A
    C is 3 commits behind and 2 commits ahead of B

    So "behind" means the other branch has commits this one doesn't, and "ahead" means this branch has commits the other does not.

提交回复
热议问题