git push提示“无法推送一些引用到...”
来源:互联网 发布:python黑客编程视频 编辑:程序博客网 时间:2024/05/16 11:05
今天在服务器搭建了一个git远程仓库,push后发现提示下列错误:
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 inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
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'.
原因是init后默认拒绝push操作
需要修改.git/config文件
在其后追加:
[receive]
denyCurrentBranch = ignore
over
- git push提示“无法推送一些引用到...”
- git push error: 无法推送一些引用到XXX
- 无法推送一些引用到 'git@github.com:Apologise/DjangoSample.git' 提示:更新被拒绝,因为远程仓库包含您本地尚不存在的提交。这通常是因为另外 提示:一个仓库已向
- git push将本地分支推送到远程
- error: 无法推送一些引用到 'https://github.com/***' 提示:更新被拒绝,因为远程版本库包含您本地尚不存在的提交。这通常是因为另外
- git无法push
- 关于vendor目录无法push到git问题
- Git正常pull失败,无法正常push到远程端
- Git使用手册:git push 推送提交本地仓库代码文件到远程仓库
- Git:ssh无法推送
- git push失败,提示unpack
- Git 在推送(Push)信息的时候提示git did not exit cleanly (exit code 1)的解决办法
- git push :推送本地更改到远程仓库的三种模式
- Git 强制推送 push force 推送多个仓库
- git命令push到服务器
- git push项目到github
- 【FAQ】git merge 后 push 到 Gerrit 失败,提示 no new changes ?
- 动画push推送到另一个页面
- Memcached安装使用和源码调试
- oracle 11g 卸载
- 网络请求 cookie的添加
- 基于内容的简单相关新闻推荐系统方案
- 游戏实现多语言版本(国际化)
- git push提示“无法推送一些引用到...”
- Linux install 命令
- jpg 格式举例详解
- wrodpress第四课wrodpress/wp-content目录文件
- codevs 1907:方格取数3
- udp-alsa单工语音传输,结果是——白花花的噪音
- jpg图片的Exif及gps信息和示例分析
- DVWA-WooYun SQL Injection
- 滑雪(百练1088) (dp+dfs)