Content from December 2015

Use bash like a hacker

(Prepared to be shared at my work: www.uniqueway.com smiley)

Through long trial and error, and with a healthy dose of help from the Linux from Scratch website, I've accumulated some good knowledge of Bash in my time with Linux and OS/X. Here are the highlights:

squash-last-commit.sh

Sometimes you make a git commit, but there's a typo or syntax error in there by accident. I normally use git rebase -i HEAD~2 and then through the magic of vim I'm fairly productive at squashing the two commits together.

But wouldn't it be nice if there was a way to run one command to squash your most recent commit (which probably has a useless message like "typo" anyway) into the next most recent? Lucky for you, there is now!