解決 Github用戶名 變為 invalid-email-address 問題


解決 Github用戶名 變為 invalid-email-address 問題

If the identity used for this commit is wrong, you can fix it with:

git commit --amend --author='Your Name <you@example.com>'

一、首頁解決操作

補上 Github 郵箱信息:vim $HOME/.gitconfig

git config --global user.name "username"
git config --global user.email "username@email.com"
git push origin master

這時候我們就可以發現,首頁已經恢復正常了。

注意:不要使用 "git init" 初始化命令!

二、內容頁解決

查看 Github 日志:bash -c "git log"

git rebase --interactive 4d49c2e
--interactive/-i 4d49c2e/4d49c2e995be282f8335(略)cde4194e

git commit --amend --reset-author

git rebase --continue
git rebase --continue
git rebase --continue

git push -f  強制覆蓋推到遠端

注意:平常操作並不會用到上述所有命令,用不好大家的 commit 會丟失或者被篡改的

感興趣,可以新建個 repo 研究下~

小貓咪問你,解決了嘛~

一些其他

Git版本控制

創建倉庫
git init
git clone
git config

保存修改

git add
git commit

查看倉庫

git status
git log –oneline

撤銷修改

查看之前的commit

git checkout
git checkout
git checkout

撤銷公共修改

git revert

撤銷本地修改

git reset
git clean

重寫Git歷史記錄

git commit –amend
git rebase
git reflog

Git協作開發

分支

git branch
git checkout
git merge

倉庫同步

git remote
git fetch
git pull
git push


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM