[Github] Github change author name
晚上10:091. You can open command prompt.
2. Create a fresh, bare clone of your repository:
git clone --bare https://github.com/user/repro.git
cd repro.git
3. If you use the official website's bash you will get error:
WARNING: Ref 'refs/heads/master' isunchanged
。
git filter-branch --commit-filter '
case "$GIT_AUTHOR_NAME" in
*[Jj]ersey*[Ss]u*)
GIT_COMMITTER_NAME="Jersey Su"
GIT_COMMITTER_EMAIL="loverjersey@gmail.com"
GIT_AUTHOR_NAME="Jersey Su"
GIT_AUTHOR_EMAIL="loverjersey@gmail.com"
git commit-tree "$@"
;;
*)
git commit-tree "$@"
;;
esac
' HEAD
4. And execute:
C:\Program Files\Git\bin\sh.exe "X:\changename.sh"
5. git push --force --tags origin master
6. rm -rf ./repro.git
[Reference]
https://help.github.com/articles/changing-author-info/
http://codex.wiki/question/1572846-5253
0 意見