国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

git fatal: ‘xxx‘ is not a commit and a branch ‘xxx‘ ‘ cannot be created from it

這篇具有很好參考價值的文章主要介紹了git fatal: ‘xxx‘ is not a commit and a branch ‘xxx‘ ‘ cannot be created from it。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

錯誤背景

當拉取一個git遠程倉庫分支時報錯:

命令:git checkout -b 本地分支名 遠程分支名

報錯:fatal: 'origin/dev_v2.8.4_v10.74.1' is not a commit and a branch 'dev_v2.8.4_v10.74.1' cannot be created from it

主要原因

遠程新建的分支沒有更新到本地。實際上,git倉庫分為本地倉庫和遠程倉庫,我們用checkout命令是從本地倉庫中找要檢出的分支的。本地倉庫只有在進行網(wǎng)絡(luò)請求時才會跟遠程倉庫交互,比如fetch命令。

處理方式

將遠程倉庫數(shù)據(jù)到本地,使用兩個命令:

1:git fetch origin

2:git remote update origin --prune

執(zhí)行完這兩步后在重新拉下分支就ok啦。

小提示:

git remote update?用于更新遠程倉庫的信息。(它會下載最新的版本庫數(shù)據(jù),并更新本地倉庫的所有指針(例如遠程分支和遠程標簽)。這樣,你就可以在本地倉庫中看到最新的遠程分支和標簽了)

git fetch?命令與一個遠程程序的倉庫交互,并且將遠程程序庫中有但在當前倉庫中沒有的所有信息拉下來后仍然存儲在你本地數(shù)據(jù)庫中。文章來源地址http://www.zghlxwxcb.cn/news/detail-690445.html

到了這里,關(guān)于git fatal: ‘xxx‘ is not a commit and a branch ‘xxx‘ ‘ cannot be created from it的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權(quán),不承擔相關(guān)法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務器費用

相關(guān)文章

  • Descriptors cannot not be created directly

    ????????在運行諸如深度學習python等程序時,如mmdetection、mmdetection3d中的程序,會出現(xiàn)報錯:“Descriptors cannot not be created directly”。詳細報錯如下: ????????TypeError: Descriptors cannot not be created directly. ????????If this call came from a _pb2.py file, your generated code is out of date

    2024年02月16日
    瀏覽(21)
  • 解決:TypeError: Descriptors cannot not be created directly

    解決:TypeError: Descriptors cannot not be created directly

    我使用pip命令下載安裝paddlepaddle庫,具體命令如下所示,采用清華鏡像源,這樣下載速度更快! 安裝完成后,我來在python文件中導入飛漿,輸出其版本號,具體如下所示: 但是,PyCharm卻報錯,具體報錯信息如下所示: 其實,仔細閱讀報錯信息就會發(fā)現(xiàn),報錯的主要原因是因

    2024年02月11日
    瀏覽(22)
  • 已解決TypeError: Descriptors cannot not be created directly.

    已解決TypeError: Descriptors cannot not be created directly.

    已解決TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc = 3.1.0If you cannot immediately regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower. 2. Set PROTOCOL_BUPFERS_PYTHON_iMPLEME

    2023年04月08日
    瀏覽(26)
  • Commit cannot be completed since the group has already rebalanced and assign

    Commit cannot be completed since the group has already rebalanced and assign

    這里是說提交commit失敗, 因為這個組已經(jīng)重新分配了 正常情況下, kafka會有一個配置用于設(shè)置一條消息的過期時間, 在規(guī)定時間內(nèi), 如果消費者提交了消費完成的信息, 那么就可以正常的分配下一條記錄給消費者, 并且將當前記錄的狀態(tài)記為\\\"已消費\\\"狀態(tài), 對消息隊列做一個標識

    2024年02月11日
    瀏覽(22)
  • fatal: could not create work tree dir ‘xxx’: Permission denied解決辦法

    fatal: could not create work tree dir ‘xxx’: Permission denied解決辦法

    場景:當去clone倉庫的時候發(fā)生錯誤 報錯內(nèi)容:fatal: could not create work tree dir ‘hui-mobile2.0’: Permission denied 自查方法:去磁盤根目錄下,右鍵–新建,如果只有文件夾一個選項,并且文件夾前面還有管理員權(quán)限的圖標,就證明你也是把權(quán)限給關(guān)了 解決辦法:在磁盤任意位置,

    2024年02月11日
    瀏覽(27)
  • [Bug0034] Git報錯 cannot lock ref 'refs/heads/master': is at xxxx but expected xxx error: could not ...

    1、問題 error: update_ref failed for ref \\\'refs/heads/master\\\': cannot lock ref \\\'refs/heads/master\\\': is at 63654e79f7ae0f902731558b3ae6679a69db09e9 but expected ec20d6ffa52920358e54703f90100bedbca4c855 error: could not update refs/heads/master 2、場景 由于為了方便解決沖突獲取到最新遠程代碼(并且本地有沖突代碼不想要),直接刪

    2024年02月16日
    瀏覽(25)
  • 已解決TypeError: Descriptors cannot not be created directly異常的正確解決方法,親測有效?。?!

    已解決TypeError: Descriptors cannot not be created directly異常的正確解決方法,親測有效?。?! 文章目錄 問題分析 報錯原因 解決思路 解決方法 總結(jié) 在Python開發(fā)中,當你嘗試以不恰當?shù)姆绞绞褂妹枋龇?descriptor)時,可能會遇到一個錯誤提示:“TypeError: Descriptors cannot not be created dir

    2024年02月21日
    瀏覽(23)
  • git問題解決:git add . 時,fatal: Unable to create ‘xxx/.git/index.lock‘: File exists.

    造成的原因是在某些比較費時的git操作時自動生成 index.lock文件,操作結(jié)束后自動刪除,相當于一個鎖定文件,目的在于防止對一個目錄同時進行多個操作。? 有時強制關(guān)閉進行中的git操作,這個文件沒有被自動刪除,之后你就無法進行其他操作,必須手動刪除,進入.git文件

    2024年02月08日
    瀏覽(28)
  • GIT 錯誤 On branch master Your branch is up to date with ‘origin/master‘. nothing to commit, working

    我的理解:分支被意外刪除 #先查看分支—應該會有一個 *master—不管他 #切到 master 分支,提示 #直接切換到 ‘origin/master’ 分支 #更新,推送一套走完 #檢測分支‘git branch‘,有如下提示就,按部就班 #繼續(xù)執(zhí)行 重新提交 切換到 master 分支 可以刪除 origin/master 分支

    2024年02月11日
    瀏覽(23)
  • Your branch is ahead of ‘origin/master‘ by 2 commits. (use “git push“ to publish your local commit

    Your branch is ahead of ‘origin/master‘ by 2 commits. (use “git push“ to publish your local commit

    遇到問題: Your branch is ahead of \\\'origin/master\\\' by 2 commits. ? (use \\\"git push\\\" to publish your local commits) 首先一定要自己手動備份一份代碼 防止意外 這個消息表示你的本地分支比遠程倉庫的 master 分支超前了2個提交。這通常發(fā)生在你在本地進行了一些提交,但還沒有將這些提交推送到遠

    2024年02月04日
    瀏覽(23)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包