I tried the following two commands:
philip@X230:~/Desktop/learn_git$ echo \'what is up, doc?\' | git hash-object --stdi