Using gitconfig per branch

前端 未结 5 517
故里飘歌
故里飘歌 2020-12-10 18:01

Our company uses many customized opensource project. Whenever I contribute upstream branch I have change to use my personal email/name. Is there any way to have gitconfig pe

5条回答
  •  爱一瞬间的悲伤
    2020-12-10 18:36

    I am not aware of any tool which automatically changes username and email after changing branch, but you can set that information just before push by using tool for rewriting history like filter-branch (and additionally set it as pre-push hook to automate the process). You can set changing author info only for specific branches.

    Check below link for details: Changing author info

提交回复
热议问题