获取本地 Git 更改以推送到远程分支时遇到问题



我有一个链接到Azure Repos的本地Git存储库,我有一个Master,Development和几个功能分支。我想将所有更改推送到开发分支,然后将其合并到 Master。

问题是我的 git 状态不断从"...最新..."到"您的分支在前面..."。如果我使用 git pull/git push,我的 git 状态说一切都很好,但如果我等待几分钟,git 状态会说我的分支再次领先。我不确定我打破了什么。

$ git status
On branch development
Your branch is up to date with 'origin/development'.
nothing to commit, working tree clean

$ git status
On branch development
Your branch is ahead of 'origin/development' by 14 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean

$ git branch -avv
KJG---Initialize-expComputer                921b26b [origin/KJG---Initialize-expComputer] Updated output object
KJG--Write-expLog                           cb0db50 [origin/KJG--Write-expLog] added test-function
KJG-Continue-expComputer                    07a6edd [origin/KJG-Continue-expComputer] save
NewFeature--Get-expADSite                   4c6d991 [origin/NewFeature--Get-expADSite] platyps update
* development                                 c38a0c5 [origin/development: ahead 14] !Deploy 4.1.4
master                                      2e01d04 [origin/master: ahead 7] Merge branch 'master' of https://<The Azure Repo Path>
remotes/origin/ARBranch                     7b4f849 removed mandatory bluebeam parameter from init-expComp
remotes/origin/Development                  6e7b779 !Deploy 4.1.2
remotes/origin/KJG---Initialize-expComputer 921b26b Updated output object
remotes/origin/KJG--Write-expLog            cb0db50 added test-function
remotes/origin/KJG-Continue-expComputer     07a6edd save
remotes/origin/Master                       c33f046 Merge branch 'development' into Master
remotes/origin/NewFeature--Get-expADSite    4c6d991 platyps update
remotes/origin/NewFeature-expPing           2751a6d updated help

你有没有尝试过一些明确的东西,比如git push origin development:development确保将本地development分支机构推送到origin/development

编辑(04/02/2020(:请参阅我在下面的评论,也关于使用developmentDevelopment作为您的两个分支名称

最新更新