配置用戶名和郵箱:
git config --global user.name "username" git config --global user.email "useremail@qq.com"
清除配置中紀錄的用戶名和密碼,下次提交代碼時會讓重新輸入賬號密碼:
git config --system --unset credential.helper
查看git配置信息
git config --list
執行命令之后,再次pull或push時會緩存輸入的用戶名和密碼:
git config --global credential.helper store
清除git緩存中的用戶名的密碼
git credential-manager uninstall
window中系統也可能會緩存Git連接的憑證
清除步驟如下:
打開控制面板->用戶賬戶->憑據管理器->普通憑證,第一條應該就是剛才操作的,建議直接編輯,用戶名和密碼編輯為正確的,再次clone就可以了。
