I have a project which has long history. I want to show the first commit on git.
How do I do this?
git log --format="%h" | tail -1 gives you the commit hash (ie 0dd89fb), which you can feed into other commands, by doing something like
git log --format="%h" | tail -1
0dd89fb
git diff `git log --format="%h" --after="1 day"| tail -1`..HEAD to view all the commits in the last day.
git diff `git log --format="%h" --after="1 day"| tail -1`..HEAD