git 骚操作

1. 重写历史提交的email 或 author,可修改的包括:GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, and GIT_COMMITTER_DATE

详见:https://git-scm.com/docs/git-filter-branch   https://cloud.tencent.com/developer/section/1138641

zjr@zjr-pc:~/disk/prjs$ git filter-branch -f --env-filter if test "$GIT_AUTHOR_NAME" = "william.tsang" 
then 
    GIT_AUTHOR_NAME=zeng.jianrong
fi
if test "$GIT_COMMITTER_NAME" = "william.tsang"
then
    GIT_COMMITTER_NAME=zeng.jianrong
fi
 -- --all

zjr@zjr-pc:~/disk/prjs$ git filter-branch -f --env-filter if test "$GIT_AUTHOR_EMAIL" = "514105868@qq.com" 
then 
    GIT_AUTHOR_EMAIL=zeng.jianrong@qq.com
fi
if test "$GIT_COMMITTER_EMAIL" = "514105868@qq.com"
then
    GIT_COMMITTER_EMAIL=zeng.jianrong@qq.com
fi
 -- --all

 

2. 

 

git 骚操作

上一篇:107. 二叉树的层次遍历 II


下一篇:react基础用法