kape123 kape123 - 1 month ago 7
Git Question

How to print / log all git commits messages from certain commit?

I need to print out all git messages from certain git commit to text file.

I've looked into answers here on Stackoverflow but couldn't find one that works for conditions I mention.

How to do that?

Answer

Use following command in git terminal:

git log --reverse --pretty=%s 487fc18... > ../log.txt

If you want to print all commits for "today" you can use command like:

git log --reverse --pretty=%s --since=midnight > ../log.txt