I want to export the log of all commits in a repo to a text file, is there any way to do this?
git log | clip
copies to clipboard, then paste to a textfile
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.
It's simple. if you don't matter save a file you need the open terminal
cd {your git repository}
git log > your_file_name.txt
if you need a special directory, just write all path in the right side, like this
cd {your git repository}
git log > /home/user/logs/your_file_name.txt
This directory, for example, you could use any one of your needs. I write a log like this just now.
This example show how to write a text in a file via bash
Have you tried git log > log.txt
?