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

Git error-fatal-Needed a single revision

這篇具有很好參考價(jià)值的文章主要介紹了Git error-fatal-Needed a single revision。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

由于公司要求,需要把舊的項(xiàng)目遷移到新的gitlab地址上,這好辦,只需要改下remote repository url就可以了,如果倉(cāng)庫(kù)中用到子模塊,還需要順便更新子模塊的url。

不過(guò),本地是編譯通過(guò)了,但是推送到遠(yuǎn)程后,gitlab CI編譯時(shí)會(huì)報(bào)錯(cuò)如下:

fatal: Needed a single revision
Unable to find current origin/HEAD revision in submodule path

網(wǎng)上也能搜到相同的問(wèn)題,但是沒(méi)有一個(gè)是在gitlab CI上遇到這個(gè)問(wèn)題的,他們的解決方法存在一些問(wèn)題,在gitlab CI上仍然會(huì)報(bào)相同的錯(cuò)誤。

后面經(jīng)過(guò)幾天的摸索,終于找到正確的解決方法。

  1. 移除子模塊
git rm <submodulePath>

注意需要使用git rm命令來(lái)刪除子模塊,這樣.gitmodules下的相關(guān)信息也能一并刪除。

  1. 提交刪除更改
git commit -m "remove submodule"
  1. 重新添加子模塊
git submodule add <url> <path>
  1. 提交添加子模塊更改
git commit -m "add submodule"

這時(shí)候再看gitlab CI,就不會(huì)再報(bào)這個(gè)錯(cuò)誤了。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-595699.html

到了這里,關(guān)于Git error-fatal-Needed a single revision的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

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

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 【git error】error: bad signature 0x00000000 fatal: index file corrupt原因分析及解決方案

    錯(cuò)誤提示: 場(chǎng)景復(fù)現(xiàn) :在使用git add .提交代碼到緩沖區(qū)時(shí)電腦宕機(jī),重啟后再次提交代碼會(huì)出現(xiàn)該提示 原因分析 :.git目錄下的index文件損壞 解決方式 :

    2024年02月08日
    瀏覽(27)
  • Geth --- Error: authentication needed: password or unlock

    Geth --- Error: authentication needed: password or unlock

    Error: authentication needed: password or unlock ??在調(diào)用sendTransaction()進(jìn)行轉(zhuǎn)賬時(shí)報(bào)錯(cuò),意思是用戶未解鎖。 ??新用戶默認(rèn)是上鎖的,交易前需要先解鎖。 ??如下圖,解鎖要交易的兩個(gè)用戶 ??解鎖后再交易,交易提交成功。 ? 參考鏈接: https://blog.miuyun.work ? 如有不對(duì),煩請(qǐng)指出,

    2024年02月13日
    瀏覽(14)
  • 解決git clone時(shí)fatal: unable to access ‘https://gitee.com/XXX.git/‘: The requested returned error: 403

    解決git clone時(shí)fatal: unable to access ‘https://gitee.com/XXX.git/‘: The requested returned error: 403

    今天想把一些項(xiàng)目的代碼提交到git的時(shí)候,出現(xiàn)了‘https://gitee.com/XXX.git/‘: The requested returned error: 403 這個(gè)報(bào)錯(cuò),然后我在網(wǎng)上找了些解決方法,最后是用這個(gè)方法解決的問(wèn)題,原來(lái)我電腦的gitee之前不知道怎么配置的是上一家公司的gitee賬號(hào)一直沒(méi)有更改過(guò)來(lái)。 以下是更換

    2024年04月27日
    瀏覽(23)
  • 【Git 教程系列第 27 篇】fatal: not in a git directory Error: Command failed with exit 128: git 問(wèn)題的解決方案

    【Git 教程系列第 27 篇】fatal: not in a git directory Error: Command failed with exit 128: git 問(wèn)題的解決方案

    這是【Git 教程系列第 27 篇】,如果覺(jué)得有用的話,歡迎關(guān)注專欄。 一:?jiǎn)栴}描述 昨天通過(guò) Homebrew 安裝 protobuf 時(shí),提示我 fatal: not in a git directory Error: Command failed with exit 128: git ,如下圖所示 不要慌,寫這篇博客問(wèn)題肯定是解決了,在終端輸入 brew -v 命令,如下圖所示 可以

    2024年02月08日
    瀏覽(38)
  • 解決:mac brew install xx 出現(xiàn) fatal: not in a git directory Error: Command failed with exit 128: git

    解決:mac brew install xx 出現(xiàn) fatal: not in a git directory Error: Command failed with exit 128: git

    wshanshi:這是一個(gè)簡(jiǎn)單的問(wèn)題總結(jié)記錄… 一、異常信息 使用brew install 時(shí)發(fā)現(xiàn)報(bào)了一個(gè)錯(cuò):fatal: not in a git directory Error: Command failed with exit 128: git,如下圖所示。 二、解決方法 brew -v 可查看提示,To add an exception for this directory。提示添加安全目錄(–add safe.directory) 執(zhí)行上述提

    2024年02月14日
    瀏覽(27)
  • git push報(bào)錯(cuò):fatal: unable to access ‘https://github.com/***/‘:The requested URL returned error: 403

    又是被自己菜死的一天。 使用git push命令后,報(bào)錯(cuò)信息如下: remote: Permission to *** denied to . fatal: unable to access \\\'https://github.com/ /\\\': The requested URL returned error: 403 當(dāng)然在git push 之前生成teken是必要的,在設(shè)置里面開(kāi)發(fā)者設(shè)置中Personal access tokens生成就可以了,注意生成之后需要復(fù)制

    2024年02月16日
    瀏覽(31)
  • 成功解決git clone遇到的error: RPC failed; curl 16 Error in the HTTP2 framing layer fatal: expected flush af

    成功解決git clone遇到的error: RPC failed; curl 16 Error in the HTTP2 framing layer fatal: expected flush af

    用git的時(shí)候可能會(huì)遇到這個(gè)問(wèn)題: (base) zhouzikang@7443-8x4090-120:~/project$ git clone https://github.com/123/123.git Cloning into ‘StyleSwap’… error: RPC failed; curl 16 Error in the HTTP2 framing layer fatal: expected flush after ref listing 如圖 嘗試通過(guò)像這樣設(shè)置 git config 來(lái)強(qiáng)制 git 使用 HTTP 1.1 然后使用git操作

    2024年02月13日
    瀏覽(22)
  • idea項(xiàng)目提交git報(bào)錯(cuò)bad revision ‘head‘

    bad revision \\\'head\\\' 新建了一個(gè)文件夾,將后端項(xiàng)目,前端項(xiàng)目都放到這個(gè)文件夾里面去了,然后想提交git VCS——import into Version control——Create git Repository之后,怎么都add不成功, 有warning提示bad revision \\\'head\\\'。 有個(gè)后端項(xiàng)目原來(lái)是svn管理的,將原項(xiàng)目.svn文件夾刪除就可以解決這

    2024年02月12日
    瀏覽(241)
  • 【git】error: RPC failed; curl 28 OpenSSL SSL_read: Connection was reset, errno 10054 fatal: expected

    【git】error: RPC failed; curl 28 OpenSSL SSL_read: Connection was reset, errno 10054 fatal: expected

    因?yàn)檫@幾天需要用git ,我不太會(huì),所以學(xué)習(xí)一下?? 當(dāng)我 git clone 的時(shí)候 結(jié)果報(bào)錯(cuò) error: RPC failed; curl 28 OpenSSL SSL_read: Connection was reset, errno 10054 fatal: expected flush after ref listing 后來(lái)查資料 說(shuō)要在 git clone 前執(zhí)行 原因是因?yàn)椋?針對(duì)所有遠(yuǎn)程服務(wù)器全局執(zhí)行,使git忽略ssl證書錯(cuò)誤

    2024年02月11日
    瀏覽(32)
  • Git報(bào)錯(cuò)fatal unable to connect to github.com: github.com[0: 20.205.243.166]: errno=unknown error的解決方法

    今天創(chuàng)建了新的GitHub項(xiàng)目,進(jìn)行g(shù)it clone時(shí)報(bào)錯(cuò) fatal: unable to connect to github.com: github.com[0: 20.205.243.166]: errno=unknown error 經(jīng)查,這個(gè)問(wèn)題是由于Git 協(xié)議通常使用端口 9418,但是有些網(wǎng)絡(luò)環(huán)境可能會(huì)限制對(duì)此端口的訪問(wèn),或者直接阻止使用 Git 協(xié)議。因此,我們需要將git://github.com/替

    2024年02月08日
    瀏覽(24)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包