Finding an Old Commit

    If you end up in a situation where you want to grab an old commit (from some other branch, even) but don’t know the commit hash, you want to access the reflog. It allows you to access old commits easily: git reflog | head -200 | grep TMP Will show info on all the commits within the last 200 that has a message containing TMP. This is really useful if you’re using some temporary hack that you want to apply/remove repeatedly without keeping it in a branch.

    Read More

    Fixing $PATH changes in tmux

    I noticed that my $PATH was being set differently between tmux and a regular shell. Specifically, without tmux my Ruby installation from asdf would override the default one but in tmux it would not. Eventually, I was tipped off by this blog post that the issue might be my /etc/zprofile file, and that was indeed the case; changing the code to this fixed it for me: if [ -x /usr/libexec/path_helper ]; then PATH="" eval `/usr/libexec/path_helper -s` fi Now, the directories that I want on the front of $PATH are consistently placed there.

    Read More