'git status' shows incorrect commit count from origin/master -




in local repo, ran following commnands:

  • git checkout -b localbranch origin/master < created new branch track remote branch 'master'
  • git status < says up-to-date
  • git reset --hard head~30 < facing build issues. build doesnt fail. other developer has checked in issues seems.
  • git status < now, says i'm behind 36 commits origin/master

i expecting show i'm behind 30 commits says 36 commits. why that? count commits merged branches or missing else here?

note: there multiple other branches in remote , few got merged master branch.

by running git reset --hard head~30, reverted 30-th parent of head. if used branching, there may more 30 commits between head , head~30.

for example:

*   501fe6f (origin/master) merge branch 'master' head |\   | * 24c80b0 foo * | 69d4fad foo |/   * 93d4461 (head -> master) foo * 566ba14 foo * 97f38e0 old 

the local master origin/master~2, there 3 commits between them. , git status shows 3 commits behind.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -