Recent Posts

(TIL) Git: Interactively Unstage Changes

less than 1 minute read

I often use git add --patch to interactively stage changes for a commit. Git takes me through changes to tracked files piece by piece to check if I want to s...

(TIL) Git: Undo a Git Mistake

less than 1 minute read

git reflog is a record of your actions in Git. With this command, you can undo almost any Git mistake.

(TIL) Git: Resetting A Reset

less than 1 minute read

Sometimes we run commands like git reset --hard HEAD~ when we shouldn’t have. We wish we could undo what we’ve done, but the commit we’ve reset is gone forev...

(TIL) Git: Accessing A Lost Commit

less than 1 minute read

If you have lost track of a recent commit (perhaps you did a reset), you can generally still get it back. Run git reflog and look through the output to see i...