As discussed here we can get commit message of a given revision via command
$ git log --format=%B -n 1 $revNum
Though this command requires we are inside the git repo folder i.e. somewhere below folder containing .git folder. That requires us to pushd and popd to go in and out of the .git folder every time we want to call the command (from external working directory).
I'm looking for params of git log command that help to specify .git folder like that. Please share as you know the ones.
p.s.
My google found me this one though adding --git-dir=$myCode/.git --work-tree=$myCode not working for git log command.