I fetch my latest git log message via $commitMessage = git log -1 --pretty=full 2>&1. What confuses me is that $commitMessage.contains("`n") returns False, but there are clearly line breaks in $commitMessage.
How can I replace all linebreaks in $commitMessage?
Example content of $commitMessage:
commit ca82a6dff817ec66f44342007202690a93763949
Author: Scott Chacon <[email protected]>
Date: Mon Mar 17 21:52:11 2008 -0700
changed the version number
Thanks
$commitMessageis an array of strings, not a single multi-line string. You can concatenate them with the-joinoperator