When I run the command:
git lg --since="24 hours ago" | tail -1
I get the expected result:
* f71da17 - blah blah blah (12 hours ago)
However, when I store this output in a variable and echo it to the console:
last_commit=$(git lg --since="24 hours ago" | tail -1); echo $last_commit
I get the unexpected result of:
dir1/ dir2/ dir3/ file1 file2 file3 * f71da17 - blah blah blah (12 hours ago)
It prepends every file in the current directory to the output. Any insight as to what's going on would be much appreciated!
gitcommand is actually a set of commands surroundinggitand ending with the specific command followinggit. What doesgit lgmean?