1. 程式人生 > >git配置過程中出現錯誤的解決辦法

git配置過程中出現錯誤的解決辦法

git push origin master出現如下錯誤:

Counting objects: 3, done.
Writing objects: 100% (3/3), 226 bytes, done.
Total 3 (delta 0), 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 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'.
To g
[email protected]
:teamwork.git ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to '[email protected]:teamwork.git'


執行命令解決問題

git config receive.denyCurrentBranch ignore

git pull出現如下錯誤:

You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:

    [branch "master"]
    remote = <nickname>
    merge = <remote-ref>

    [remote "<nickname>"]
    url = <url>
    fetch = <refspec>

See git-config(1) for details.

執行命令:
$ git config branch.master.remote origin
$ git config branch.master.merge refs/heads/master

解決問題

相關推薦

git配置過程出現錯誤解決辦法

git push origin master出現如下錯誤: Counting objects: 3, done. Writing objects: 100% (3/3), 226 bytes, done. Total 3 (delta 0), reused 0 (del

Git配置過程出現的問題,以及解決方案

    提示出錯資訊:fatal: remote origin already exists.     解決辦法如下:     1、先輸入$ git remote rm origin   

安裝Photoshop時提示安裝過程出現錯誤解決辦法

應該是C盤中殘留之前版本的Photoshop檔案,導致當前版本安裝不了。 使用工具Search Everything搜尋,把C盤中所有Photoshop的檔案資料夾都刪除,然後就可以了。 同理,Ado

如何解決git====push 過程出現的。error: failed to push some refs

round hang about -h font 通過 成功 oge mage 當我們在利用git push 文件到倉庫時出現了一下問題: ! [rejected] master -> master (fetch first)error: failed to pu

Prometheus配置過程出現的bug及解決方案

一、簡介 Node exporter,Promenade和Alertmanager在安裝配置後,在除錯Prometheus執行中出現了不少bug,針對這些bug進行了解決。本部落格主要蒐集總結這些bug和解決方案,進行記錄。 Prometheus執行命令參考如下: docker ru

AspMVC -EF 使用過程出現錯誤解決

在.Net 使用EF如果不正確,可能會出現異常錯誤。一般而言,有可能以下錯誤場景1,在程式集“XXX”中未找到遷移配置型別“XXX.Migrations.Configuration”。這種錯誤出現在定義的DBContext 類與定義的web.config 資料連線串名稱不一致

git 提交專案程式碼到碼雲步驟 以及出現錯誤解決辦法

出現錯誤  $ git push origin master To https://gitee.com/heguxin/XXX  ! [rejected]        master -> master (fetch first) error: failed to push some refs to '

SpringMVC配置過程出現的問題!

編碼格式 efault 來源 app 代碼 spring 配置 沒有 過程 <c:set var="ctx" value="${pageContext.request.contextPath}" />不起作用,原因是web.xml沒有定義了XML的版本,編碼格

php程序上傳網站logo出現錯誤解決辦法

文件夾權限 php程序 設置 emp nbsp warn ror ora 文件夾創建 工作中遇到的問題,我都會一一解決,並把解決辦法發到這裏來。上傳網站logo出現錯誤:php warning: file upload error unable to creatr a

Ant編譯過程出現錯誤:找不到符號

Ant進行javac編譯時,如果出現找不到符號的錯誤,則可能是缺少類路徑,則需要配置依賴的jar包,使用Ant<classpath>的標籤,載入依賴的jar包。 如圖所示: 但是我遇到的

mysql5.7.19在centos虛擬機器下手動(離線)安裝配置過程與一些問題解決辦法

一、centos下手動配置MySQL資料庫 1.下載MySQL資料庫官網: https://dev.mysql.com/downloads/mysql/  我下載的是mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz 2.通過winscp軟

git 配置過程 fatal: 拒絕合併無關的歷史

1.首先將遠端倉庫和本地倉庫關聯起來: git branch --set-upstream-to=origin/master master 2.然後使用git pull整合遠端倉庫和本地倉庫, git

Unity3D 5.x 啟動過程 License Error 解決辦法

新安裝了Unity3D的最新版本5.4 ,啟動過程中執行"Check License"步驟的時候報錯,"License Error" ,說我沒有License。 Unity3D不是對普通使用者免費嗎?幹嘛不讓我用啊? 這讓我鬱悶了好久。我是按照“註冊帳號--下載--安裝--

《BI專案筆記》SSAS部署時發生的問題——元資料管理器存在錯誤 解決辦法

在生成和部署期間出錯。是否繼續?解決辦法: 用Microsoft SQL Server Management Studio 連線Analysis Services 然後刪除多維資料庫,重新佈署。這樣就OK的。 (adsbygoogle = window.adsbygoogle

編譯錯誤 說明: 在編譯向該請求提供服務所需資源的過程出現錯誤。請檢查下列特定錯誤詳細資訊並適當地修改原始碼。

 系統釋出後,在本地機子上一切正常,但是上傳到伺服器出現如下錯誤: “/”應用程式中的伺服器錯誤。 -------------------------------------------------------------------------------- 編譯錯誤

出現錯誤解決辦法

作者:朱金燦在使用IIS開啟某個asmx頁面時,出現下面錯誤: 解決辦法是:1. 右鍵單擊某個節點的“屬性”,如下圖:2. 在開啟的對話方塊中選擇目錄(或虛擬目錄)選項卡 —> 在下半部分“應用程

LoadRunner 使用過程問題及解決辦法記錄

1.web_find()插入檢查點回放錯誤 Action.c(83): Error -27985: There is no context for HTML-based functions. A previous function may not have used "Mo

DataGrid儲存資料時出現錯誤解決辦法.

解決辦法:前臺設定DataGridDataKeyField="ID"錯誤提示:Server Error in '/News' Application. Index was out of range. Must be non-negative and

npm安裝時出現錯誤解決辦法及mac下升級node.js

npm error  cwd.process 關閉所有terminal終端,執行下面的命令: $ sudo npm cache clean -f $ sudo npm install -g n n是用來管理node.js版本的。 mac 升級 node.js 的簡易方法。

C# 在編譯向該請求提供服務所需資源的過程出現錯誤。請檢查下列特定錯誤詳細資訊並適當地修改原始碼。

行 1: #pragma checksum "E:\WEBSERVICE\WebClient\default.aspx" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "8929E17C339CE9FDACB5A0E34138AABF" 行 2: //----