推送从Git创建的分支时出错
我刚刚从提交创建了一个分支推送从Git创建的分支时出错,git,branch,push,commit,Git,Branch,Push,Commit,我刚刚从提交创建了一个分支 git branch my_branch my_commit_hash 我不会修改任何东西。现在我想将这个分支推送到远程存储库 git push -u origin my_branch 不幸的是,我得到了这个错误 ! [remote rejected] my_branch -> my_branch (my_commit_id by ... was not committed by ...) error: failed to push some refs t
git branch my_branch my_commit_hash
我不会修改任何东西。现在我想将这个分支推送到远程存储库
git push -u origin my_branch
不幸的是,我得到了这个错误
! [remote rejected] my_branch -> my_branch (my_commit_id by ... was not committed by ...)
error: failed to push some refs to 'http://repo'
我做错了什么
我已经标记了从中创建分支的提交。也许这会导致此错误?尝试先执行git签出
git checkout your_branch
或者,您可以在创建分支时执行此操作
git checkout -b your_branch
这是英语的简写
git branch your_branch
git checkout your_branch
那你应该能做到
git push origin your_branch
可能是权限问题?这看起来像是一个钩子,用于检查推送的提交是否由某个人进行(
不是由…
提交的)。您有权访问服务器吗?联系服务器管理员并检查哪些挂钩在那里处于活动状态。。。