git log last 2 commits code example
Example 1: git log one line
git log --oneline
Example 2: git get latest log output to file
git log --oneline -50 > log50_latest_commits.txt
Example 3: git revert last 2 commits
$ git revert --no-commit D
$ git revert --no-commit C
$ git revert --no-commit B
$ git commit -m "the commit message"