報錯資訊:
! [remote rejected] master -> master (push declined due to email privacy restrictions)起因:
我這裡不選擇關閉上面截圖的設定,按照方法繼續操作。
git config --global user.email
在settting裡面的emails。
我的推薦e-mail:[email protected]
git config --global user.email 你的推薦e-mail
這裡使用git config --global -e直接編輯修改
git commit --amend --reset-author
輸入命令後,進入vi模式,不熟悉的,可以直接在英文輸入法下:wq(冒號wq)儲存
git push
最後給個完整命令截圖:
git修改提交作者郵箱
git config user.name 現在的名字 git config user.email 現在的郵箱 a 修改最後一次git commit amend author newauthor b 修改某次 獲取倒數幾次提交資訊 git rebase i head 2 需要修改哪次提交,就修改pic...
git修改提交作者和郵箱
作用一名程式設計師,我們會經常混跡與不同的 倉庫,時常不同倉庫會有作者資訊驗證。比如公司內建的gitlab一般會要求統一使用公司內部的域賬號簽名 github要求使用github賬號簽名等。因此,很容易犯在不同庫中提交 發現預設配置的author資訊沒有變更,結果push被拒絕。下面介紹幾種常用的解...
git 修改已提交記錄的郵箱
先執行修改,替換成新的 使用者名稱和 郵箱,注意 以下方式會將所有人的提交都轉換成新的記錄 git filter branch f env filter git author name newname git author email newemail git committer name comm...