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
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