最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

repository - Why on Azure DevOps after pull request on repo one appear 1 behind - Stack Overflow

programmeradmin2浏览0评论

Azure DevOps Repos, situation is really simple, we have

  • Branch Master ---+---+ Head
  • Branch Develop ---+---+ Head + ... + changes

After some commit on Develop, we create pull request from Develop > To Master and it completing without conflicts and all change are merged into Master. All is ok.

But now, on Azure DevOps Develop seems is 1 commit behind respect to Master, but from git command line all is up-to-date.

  • Branch Master ---+---+...+...
  • Branch Develop ---+---+...
    • 1 behind respect to Master

Why?

Azure DevOps Repos, situation is really simple, we have

  • Branch Master ---+---+ Head
  • Branch Develop ---+---+ Head + ... + changes

After some commit on Develop, we create pull request from Develop > To Master and it completing without conflicts and all change are merged into Master. All is ok.

But now, on Azure DevOps Develop seems is 1 commit behind respect to Master, but from git command line all is up-to-date.

  • Branch Master ---+---+...+...
  • Branch Develop ---+---+...
    • 1 behind respect to Master

Why?

Share Improve this question edited Apr 2 at 11:31 Donald Duck is with Ukraine 8,91223 gold badges79 silver badges102 bronze badges asked Mar 28 at 8:19 Domenico MonacoDomenico Monaco 1,23712 silver badges22 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

The merge will add a special kind of commit which combines the 2 branches together; The head of your master and develop branch. It allows you to merge branches even when both branches have 'new' commits (which are not part of the history of the other branch).

There's also a fast-forward merge (think it's called rebase in azure devops) that does what you're expecting where it simply pastes the new commits onto the master in a linear fashion without the additional commit. But it requires the your develop branch to be up to date with the master.

It's a preference, but having the merge commit gives you some extra insights when it was merged and all related information provided by the platform. E.g. for azure devops it'll link work items and the pull request to it in their UI.

发布评论

评论列表(0)

  1. 暂无评论