I want to step backwards, commit-by-commit, to find some css styling that I overwrote. I'm aware of git-bisect; I used it and it didn't help me find my old work.
I can get a table of commit hashes in historical order with this command:
$ git log --pretty=oneline | awk '{print $1;}'
f3791f1da33b9e92a3a5292a0542834aca0908ef
2720a9ec4bb5b4f7b4dd02b056c375e71a44be3c
a9bb455608db70c76545e5862b89a02f9e9f590d
So I just need to grab the first one, and do a git checkout with it. I've tried to use head, but I don't know enough about pass syntax to pass the output correctly to it:
$ $(git log --pretty=oneline | awk '{print $1;}') | head -1
bash: 0dcca7e530fca682552341718462af150fe27dc5: command not found
$ $(git log --pretty=oneline | awk '{print $1;}') > head -1
bash: 0dcca7e530fca682552341718462af150fe27dc5: command not found
How can I get the top of the output from my previous command
I'd like this as a one-liner, so that I can add it to my git aliases, but if it's not, that's fine; I'll make a bash function.
goodorbad.