1

I have forked a repo and I commit and push new changes and merged changes came from pull upstream after doing squash. So isn't is supposed to show

The branch is x commits ahead of upstream:master"

Instead its showing

The branch is x commits ahead of upstream:master and y behind of upstream:master

Isn't it strange?
because I have merged upstream code and committed it along with my new code.

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
A srinivas
  • 611
  • 2
  • 6
  • 21

1 Answers1

0

Being ahead and behind means a divergent history.

But if you did a merge --squash (result from a pull, which is a fetch + merge), it only added a new commit, it did not rewrite the history.
See "In git, what is the difference between merge --squash and rebase?".

If you did squashing of your local history (previously pushed), then the history is rewritten, and you would get an "ahead/behind" message

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283