我是 Git 的初學者,我遇到了這種奇怪的行為:
1 / 當我推送一些代碼時,Git 說 '=' 不是 URL !!
git push -u origin master
---> fatal: '=' does not appear to be a git repository
2 / 所以我檢查了配置,我看到 2 個“推送”URL 等于“=”
git config --list
---> ...
remote.origin.url==
remote.origin.url==
[email protected]:<name>/<project>.git (push)
remote.origin.fetch= refs/heads/*:refs/remotes/origin/*
我怎樣才能糾正那個錯誤???.git/config 檔案好像正常
uj5u.com熱心網友回復:
首先,用于git config --list --show-origin確定空值的來源,輸出將是這樣的:
file:.git/config remote.origin.url==
file:/other/directory/config remote.origin.url==
然后從這些檔案中洗掉配置行。
uj5u.com熱心網友回復:
編輯.git/config以洗掉兩個空白 URL。
[remote "origin"] // Search this section.
注意:.git是專案根目錄中的隱藏檔案夾。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/431867.html
標籤:混帐
下一篇:擁有已經注冊的作業樹意味著什么?
