![远程拒绝] master - > master(当前已检出分支)git中出错

 肾虚养生 发布于 2023-02-03 02:34

对于GIT来说,我是新手.在这里,我试图解释我的错误情况.请帮我准确的命令.

我必须在GIT远程位置清空存储库.我只有权克隆它们并将我的更改推送给它们.我没有任何权限直接访问GIT Remote.回购是.funder-sceduler.git和funder-request.git.详细路径:

    SSH://gitadmin@svn.wps.wiley.com/apps/git/web-platform/dotcms/modules/funder-request.git

    SSH://gitadmin@svn.wps.wiley.com/apps/git/web-platform/dotcms/modules/funder-scheduler.git

现在我在当地克隆了funder-scheduler.git.我添加了我的更改.然后我做了一个GIT提交.然后git push origin master.它工作正常.

但是当我为funder-request.git做同样的事情时,运行命令'git push origin master'之后会抛出以下错误:

>$ git push origin master
>Enter passphrase for key '/u/.ssh/id_rsa':
>Counting objects: 81, done.
>Compressing objects: 100% (61/61), done.
>Writing objects: 100% (81/81), 215.86 KiB | 126.00 KiB/s, done.
>Total 81 (delta 4), reused 0 (delta 0)
>remote: error: refusing to update checked out branch: refs/heads/master
>remote: error: By default, updating the current branch in a non-bare repository
>remote: error: is denied, because it will make the index and work tree inconsist
ent
>remote: error: with what you pushed, and will require 'git reset --hard' to matc
h
>remote: error: the work tree to HEAD.
>remote: error:
>remote: error: You can set 'receive.denyCurrentBranch' configuration variable to

>remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into

>remote: error: its current branch; however, this is not recommended unless you
>remote: error: arranged to update its work tree to match what you pushed in some

>remote: error: other way.
>remote: error:
>remote: error: To squelch this message and still keep the default behaviour, set

>remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To ssh://gitadmin@svn.wps.wiley.com/apps/git/web-platform/dotcms/modules/funder-
request.git
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'ssh://gitadmin@svn.wps.wiley.com/apps/git/we
b-platform/dotcms/modules/funder-request.git'

请求帮助我完成命令来解决这个问题.我不会理解理论解释,我很抱歉

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有