How do I export a git log to a text file?
I want to export the log of all commits in a repo to a text file, is there any way to do this?
4 Solutions collect form web for “How do I export a git log to a text file?”
You’ll just need to disable the pager.
git --no-pager log > log.txt
If you want to format it to look nicer, you can use parameters of git log.
Have you tried
git log > log.txt ?
git log | clip
copies to clipboard, then paste to a textfile
You can make log report more clearly, by
(1) setting number of latest commits (for example, in below command, we get latest 50 commits, you can change it to 100, 500, etc.)
(2) display long commit in one line
This command is display commit log in current branch:
git log --oneline -50 > log50_latest_commits.txt
(3) If you want display commit at all branch
git log --all --oneline -50 > log50_latest_commits.txt
Generated text file will stand at the current directory.
git version 2.11.0.windows.1 and it works on many other versions of Git)