修改git上次commit的user.name/user.email 1 git commit –amend –author=‘Your Name [email protected]’ 修改git历史commit的user.name/user.email 12345678910111213141516171819202122232425 # !/bin/shgit filter-branch --env-filter 'an="$GIT_AUTHOR_NAME"am="$GIT_AUTHOR_EMAIL"cn="$GIT_COMMITTER_NAME"cm="$GIT_COMMITTER_EMAIL"if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]then cn="Your New Committer Name" cm="Your New Committer Email"fiif [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ]then an="Your New Author Name" am="Your New Author Email"fiexport GIT_AUTHOR_NAME="$an"export GIT_AUTHOR_EMAIL="$am"export GIT_COMMITTER_NAME="$cn"export GIT_COMMITTER_EMAIL="$cm"' 赞微海报分享
近期评论