Home About Notes

Dash

Jun 26, 2023

I knew that you could use dash "-" with git to check out previously checked out branch. eg.

git checkout feature
git checkout master
git checkout - # goes back to feature

But it turns out you can use it with other commands too, like cd. Saves a lots of time when switches branches and directories.