【发布时间】:2021-07-19 08:49:48
【问题描述】:
我已经执行了 git push,但它没有反映最近对 GitLab 的推送,
以下是详细信息:
**git push -u origin ABC_10.0.0.0_DEV**
Branch 'ABC_10.0.0.0_DEV' set up to track remote branch 'ABC_10.0.0.0_DEV' from 'origin'.
Everything up-to-date
**git branch**
ABC_10.0.0.0_DEV
* bug_fixes
master
**git log**
commit 4a00000000b2000000bfdf1558d5e7420be0a1b1 (HEAD -> bug_fixes)
Author: abc <abc@abc-abc-abc.local>
Date: Mon Jul 10 13:05:33 2021 +0530
bug fixes
commit 3700000068377bef5e966213f5fb64c51778349f (origin/ABC_10.0.0.0_DEV, ABC_10.0.0.0_DEV)
Author: def <def.xyz@lmc.com>
Date: Thu Jul 09 12:53:08 2021 +0530
abc thing added
**git remote show origin**
* remote origin
Fetch URL: http://abc@gitlab.def.com/ABC/Def.git
Push URL: http://abc@gitlab.def.com/ABC/Def.git
HEAD branch: master
Remote branches:
ABC_10.0.0.0_DEV tracked
master tracked
Local branches configured for 'git pull':
ABC_10.0.0.0_DEV merges with remote ABC_10.0.0.0_DEV
master merges with remote master
Local refs configured for 'git push':
ABC_10.0.0.0_DEV pushes to ABC_10.0.0.0_DEV (up to date)
master pushes to master (up to date)
**git remote -v**
origin http://abc@gitlab.def.com/ABC/Def.git (fetch)
origin http://abc@gitlab.def.com/ABC/Def.git (push)
您能帮我解决这里的问题吗? 如果您需要更多日志,请告诉我。
【问题讨论】:
-
抱歉,不清楚是什么问题。你是说当你在网络浏览器中查看 Gitlab 时,“ABC_10.0.0.0_DEV”分支没有预期的提交?
-
是的,使用以下命令执行的最新提交在 gitlab 上不可用:git push -u origin ABC_10.0.0.0_DEV。分支'ABC_10.0.0.0_DEV'设置为从'origin'跟踪远程分支'ABC_10.0.0.0_DEV'。一切都是最新的
-
那么,在您显示的输出中,当您查看 Gitlab 上的分支时,没有显示提交“3700000068377bef5e966213f5fb64c51778349f”(“abc thing added”)?还是您希望提交“4a00000000b2000000bfdf1558d5e7420be0a1b1”(“错误修复”)出现在该分支上?
-
是的,我期待“4a00000000b2000000bfdf1558d5e7420be0a1b1”(“错误修复”)提交出现在 gitlab 中。
-
好的,所以在某处存在误解:如您的 git log 输出所示,该提交仅存在于“bug-fixes”分支,而不是“ABC_10.0.0.0_DEV”分支。