git: handy alias to find the repository root

To quickly move to the root of the current git repository, I set up this alias: git config –global alias.home ‘rev-parse –show-toplevel’ Now,  git home prints the full path to the root directory of the current project. To go there, type (Mac/Linux only) cd `git home` Notice the backticks. They’re not single quotes. This executes the command and then uses …

Read moregit: handy alias to find the repository root

git: I want my stash back

TL;DR – it’s a good idea to throw experimental changes on a branch instead of stashing them. Today I stashed some changes, then popped them out, then decided they were a failure and wiped them out, then (later) wanted them back. git stash makes a commit, and commits are not deleted for thirty days, so …

Read moregit: I want my stash back