1

How to extract all the code committed by a certain author to a text file in Git?

If there is a repository and I want to have all code of a certain committer over the history of the repo from its start from its master branch in one text file.

Try to use git log --author="Jon" and it will show the commit message and the date of all the commits of him but without the code itself, I need this information along with the code to be outputted in one text file. I hope this made what I want clear.

durron597
  • 31,968
  • 17
  • 99
  • 158
Wazery
  • 15,394
  • 19
  • 63
  • 95

1 Answers1

1

You can use git log -p --author="John", and that will give you the path representing what code has been modified.

For getting all the patches in one file, see "git diff with author filter".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250