2

I want to publish existing git repository on github. I find it unnecessary to provide personal data within git commit logs (name, email). Nevertheless, I want to store history of changes.

How do I strip/replace personal information from existing fully accessible git repository?

Basilevs
  • 22,440
  • 15
  • 57
  • 102
  • “[…] from existing fully accessible git repository” – it it’s already fully accessible, then the chance is pretty high that someone already got your personal information. – poke Nov 01 '11 at 16:40

2 Answers2

0

You should use git filter-branch. For script example check this answer Change the author and committer name and e-mail of multiple commits in Git.

Community
  • 1
  • 1
the.malkolm
  • 2,391
  • 16
  • 16
0

To remove personal details in log messages, you can use git filter-branch with the --msg-filter flag.

--msg-filter <command>
       This is the filter for rewriting the commit messages. The argument
       is evaluated in the shell with the original commit message on
       standard input; its standard output is used as the new commit
       message.

PS: The email address that you have in your public profile in Github ( https://github.com/account ) is only revealed to people visiting your profile. The email address that you use in your commits ( https://github.com/account/email ) which and used to identify your commits is not revealed to public

manojlds
  • 290,304
  • 63
  • 469
  • 417