News for hackers. Stuff that matters.
Re:How to navigate directories faster with Bash (2015) by hinkley on Thursday April 22, 2021 @12:44PM (#26904859)
I don't think this is documented anywhere that I've found, but

   git checkout -
checks out the previous branch you were on, similar to cd -
Re:How to navigate directories faster with Bash (2015) by secondstring on Thursday April 22, 2021 @05:02PM (#26908149)
Big fan of git-aliasing this to `git back`. I actually use it a ton and that small amount of extra chars plus the "-" makes a pretty decent difference for me.
Re:How to navigate directories faster with Bash (2015) by aj12ay on Thursday April 22, 2021 @11:08PM (#26910604)
Speaking of extra characters, I'm pretty far in with the `git` commands. `git checkout` -> `g c`, `git status` -> `g s`.

I usually do `g c -` but I guess `g back` wouldn't be bad.