Bitbucket无法推送至指定分支dev-k8s的问题求助
大家好,我碰到了个头疼的问题:我能正常把代码推送到Bitbucket仓库的其他分支,但唯独没办法推送到dev-k8s分支,身边的同事也都搞不清楚状况。我检查了仓库的分支设置,没发现针对这个分支的特殊配置。
下面是我操作时的命令和对应输出:
首先尝试常规推送:
λ git push origin dev-k8s
输出结果:
To https://bitbucket.org/tomas-tiefenbach-simplaq/simplaq-portal.git
! [rejected] dev-k8s -> dev-k8s (non-fast-forward)
error: failed to push some refs to 'https://bitbucket.org/tomas-tiefenbach-simplaq/simplaq-portal.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
然后我执行拉取命令同步:
λ git pull origin dev-k8s
输出结果:
From https://bitbucket.org/tomas-tiefenbach-simplaq/simplaq-portal
- branch dev-k8s -> FETCH_HEAD
Already up to date.
之后我尝试强制推送:
λ git push -f origin dev-k8s
输出结果:
Enumerating objects: 11, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 570 bytes | 570.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Permission denied to update branch dev-k8s.
To https://bitbucket.org/tomas-tiefenbach-simplaq/simplaq-portal.git
! [remote rejected] dev-k8s -> dev-k8s (pre-receive hook declined)
error: failed to push some refs to 'https://bitbucket.org/tomas-tiefenbach-simplaq/simplaq-portal.git'
我还运行了gitk --all查看分支全貌,但暂时没找到头绪,有没有大佬能帮忙分析下原因?
备注:内容来源于stack exchange,提问作者Čamo

