1. 程式人生 > >git上找不到遠端分支,直接切換報錯error: pathspec 'origin/XXX' did not match any file(s) known to git.

git上找不到遠端分支,直接切換報錯error: pathspec 'origin/XXX' did not match any file(s) known to git.

假設專案上有一個分支test,使用git branch -a看不到該遠端分支,直接使用命令git checkout test報錯如下:

error: pathspec 'origin/test' did not match any file(s) known to git.

解決方法: 
1、執行命令git fetch取回所有分支的更新

2、執行git branch -a可以看到test分支(已經更新分支資訊)

3、切換分支git checkout test

原文地址:http://www.aiuxian.com/article/p-3214532.html

相關推薦

git遠端分支,直接切換error: pathspec 'origin/XXX' did not match any file(s) known to git.

假設專案上有一個分支test,使用git branch -a看不到該遠端分支,直接使用命令git checkout test報錯如下: error: pathspec 'origin/test' d

Git使用之(pathspec master did not match any file(s) known to git)

ttr uil number oca there 理解 ng- art opera Git使用之(pathspec master did not match any file(s) known to git) 標簽: git / pathspec / branch /

windows的dos下使用git commit出現error: pathspec 'README.md'' did not match any file(s) known to git.

windows的dos下使用git commit出現error: pathspec 'README.md'' did not match any file(s) known to git. 如下圖, git commit -m 'update README.md' 和 git commit -m

pathspec '–m' did not match any file(s) known to git.

使用shell寫git commit -m命令報錯 pathspec '–m' did not match any file(s) known to git. 指令碼如下 cd /Users/M

Git之如何解決Error:pathspec '/layout/radar_chart.xml' did not match any file(s) known to

不廢話,先爆錯誤圖片 問題產生原因:         我把android studio裡面的專案提交到github裡面的時候,出現了了error: pathspec 'app/src/main/res/layout/radar_chart.xml' did not ma

git checkout 原因 (error: pathspec 'master' did not match any file(s) known to

以下是發生的場景在一個空的目錄中(/tempRepo)執行:[color=violet][b]git init[/b][/color]成功建立一個空的git倉庫[color=red][size=xx-small]注:現在tempRepo上除了.git資料夾外,沒有任何檔案然後

git checkout 出錯原因 (error: pathspec 'master' did not match any file(s) known to

git checkout 報錯原因 在一個空的目錄中(/item) 執行命令 git init 成功建立一個空的git倉庫 執行: git checkout -b dev 成功建立一個dev分支 現在

git add readme.txt fatal: pathspec 'readme.txt' did not match any files

使用 git add readme.txt 命令,將本地檔案增加到倉庫時,命令報錯 fatal: pathspec ‘readme.txt’ did not match any files 說明在

git push遠端分支error: src refspec xxx does not match any.

error: src refspec xxx does not match any. error: failed to push some refs to 'ssh://[email protected]' 解決方法:git push origin HEAD:

git:git add readme.txt pathspec 'readme.txt' did not match any files

在git bash裡直接輸入: git add readme.txt 報錯: pathspec 'readme.txt' did not match any files 說明在本地目錄

git commitdid not match any file known to git的錯誤的問題

今天使用git將程式碼提交到碼雲,使用到以下命令時: git commit -m 'project initialized' 回車之後報錯了,報了以下的錯誤: error: pathspec 'initialized'' did not match

myeclipse到Deployment Assembly ,

今天tomcat載入maven專案遇到錯誤: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 在網上查到解決方法: 出自:http://www.c

kbengine前期設定相關mysql8.0 'caching_sha2_password' cannot be loaded: 到指定的模組解決

TelnetServer server is running on port 32000 dbmgr-1: [ERROR] DBInterfaceMysql::attach: mysql_errno=2059, mysql_error=Authenticatio

MyEclipse工具使用-到Maven Dependencies專案

轉自:http://www.xuebuyuan.com/2225268.html myeclipse不是很穩定,總是會出各種各樣的漏子,我一直都這樣覺得,但是又覺得比eclipse功能多多了。 這次出現的問題是maven專案被IDE識別了,但是沒有出現maven de

dubbo到dubbo.xsd,Multiple annotations found at this line:

參考http://blog.csdn.net/zbw18297786698/article/details/54582071 報錯: Multipleannotations found at this line: – cvc-complex-type.2.4.c: Th

git操作時提示:fatal: pathspec 'README' did not match any files 的處理辦法

簡單的 後綴 嚴重 大小寫 簡單 file 系統 如果 fatal 根據網上教程使用git,結果沒幾步就開始出問題。。。 就是個簡單的git add 看到提示的fatal,下意識的認為很嚴重,開始以為跟大小寫有關,結果試了下還是不行 加上文件的後綴名,搞定。 並且跟大小

git add README.md fatal: pathspec 'README.md' did not match any files

在idea Terminal 控制檯輸出: git add README.md 丟擲異常: fatal: pathspec 'README.md' did not match any files 錯誤原因:      git add README.m

Git錯誤--error: src refspec master does not match any.

一.問題描述 將本地倉庫的內容push到遠端倉庫時提示錯誤: error: src refspec master does not match any. error: failed to push some refs to 'https://gitee.com/sweeneys/mysite

Git 在Push的時候出現 “error: src refspec master does not match any. error: failed to push some refs to '”

git Push到gitlab失敗, 出現如下錯誤: error: src refspec master does not match any. error: failed to push some refs to '[email protected]:orange-lzw/

git push src refspec xxx does not match any的錯誤

今天在向一個新的遠端分支上推送專案的時候報錯: 遠端分支branch_new是其他人建的,我在自己本地修改後把自己分支的修改推送到這個遠端分支上。 把修改提到本地倉庫: git add ./ git commit -m"增加聖誕主題" git checkout del git pull ori