git 使用遇到的問題解決

2021-10-01 14:45:54 字數 1108 閱讀 1727

(1)git config --list 指令

如顯示有多個user.name 或 user.email ,且值不同

user.name=a1

user.name=a2

user.name=em

[email protected]

git config --global --replace-all user.email "輸入你的郵箱"

git config --global --replace-all user.name "輸入你的使用者名稱"

(2)提交**報錯,expected committer name 『a 1』 but found 'a1』

造成該問題的原因一般可以分為2種

a:git遠端制定了**提交限制策略來保證**提交者資訊與git賬號資訊的一致性

b: 本地重新設定過user.name ,與email 不匹配

git config --global user.name "username"

git config --global user.email ***@qq.com

重新提交本次修改

git rebase --force-rebase

git commit --amend --author=「username ***@qq.com」

彈出編輯頁面(或開啟的編輯器中)輸入資訊儲存後退出。

在編輯頁面,新增或修改 #auhtor: 行

儲存並退出。

(3) git for windows下的filename too long

從github轉殖乙個專案下發出現了錯誤:filename too long

git有可以建立4096長度的檔名,然而在windows最多是260,因為git用了舊版本的windows api,為此踩了個坑。解決

開啟git命令列:

git config --global core.longpaths true

git遇到的問題解決方案

問題1 the requested url returned error 401 unauthorized while accessing?問題原因 處理辦法 1.將其改成pubilc 2.使用ssh進行git clone.問題2 fatal refusing to merge unrelated ...

git問題解決

在開發中我們經常需要通過 git 對 進行拉取和提交,頻繁地輸入使用者名稱和密碼會帶來很大的麻煩,下面就介紹一下解決git每次拉取 提交 時都需要輸入使用者名稱和密碼的方法。很簡單,只要兩步驟就能實現 1.在 gitconfig目錄下多出乙個檔案,用來記錄你的密碼和帳號 1git config gl...

MBProgressHUD遇到的問題解決

因為某些原因呼叫mbprogresshud的時候沒注意不在主線成,導致程式總崩潰在mbprogresshud的這一句 nsassert nsthread ismainthread mbprogresshud needs to be accessed on the main thread.nsthre...