Git 今天终于用了一下 git filter-branch ,爽死了

fsword · January 06, 2013 · Last by optor666 replied at June 12, 2018 · 20612 hits

用 commit-filter 修改 commiter 的 name 和 email,以前听 @saito 同学说过,现在真的感受到 git 的强大了,我想我是回不去了......

这是在篡改 name and email?

这是在篡改 name and email。一句话不割: git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Newname'; GIT_AUTHOR_EMAIL='newemail'; GIT_COMMITTER_NAME='Newname'; GIT_COMMITTER_EMAIL='newemail';" HEAD

是啊,我之前提交的都是 gmail 邮箱,现在要用公司邮箱提交,所以把还没 push 的一批提交记录修改一下(已经 push 的如果修改,就需要 git push -f 了,这个可以通过相应 remote 的服务端进行控制)

刚刚拿 --env-filter 改了一下,好棒!

不错用它修改提交人信息太好了》https://segmentfault.com/a/1190000008828569

You need to Sign in before reply, if you don't have an account, please Sign up first.