zoukankan      html  css  js  c++  java
  • git push报错

    下午在做git的一些相关操作的时候,遇到了个问题,现在记录下来:

    情景:我在E盘建立了一个仓库和一个工作空间,先把仓库里面的项目clone到工作目录,然后修改工作目录里面的东西,修改了之后打算push回去仓库里面,结果,问题大了,push出现错误了:

    错误信息如下:

    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 E:/git
    ! [remote rejected] master -> master (branch is currently checked out)
    error: failed to push some refs to 'E:/git'

    我搜索了网上相关解决方案,找到了解决方法,根据步骤。我在工作空间里面执行了以下命令:

    git config receive.denyCurrentBranch ignore(这个命令用于初次配置git的接收)
    接着我再度尝试,结果,出现了下面另一个错误:

    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 E:/git
    ! [remote rejected] master -> master (branch is currently checked out)
    error: failed to push some refs to 'E:/git'
    Done

    经过再度思考,考虑到刚刚只是配置工作空间的git接受,但是真正的仓库还没有配置,那么就没法进行对接了,所以,我在仓库执行了相同命令,问题解决了~~

    ==================================================================
    欢迎交流:QQ392989505
    作者:王瓒
    作者:Elaine
    交流QQ:392989505
  • 相关阅读:
    @transactional注解下失效
    string.format格式化字符串中转义大括号“{}”
    ArrayList循环遍历并删除元素的常见陷阱
    HashMap、HashTable与ConcurrentHashMap区别
    -webkit-,-moz-,-ms-,-o-具体指什么了?
    常用js正则表达式大全
    hashcode详解
    如何区分oracle服务器、oracle客户端、plsql?
    Oracle Client(客户端) 安装与配置
    Openresty使用
  • 原文地址:https://www.cnblogs.com/ITGirl00/p/3453243.html
Copyright © 2011-2022 走看看