It is a bit of embarrassing but I spent 10 years in my field without knowing the
git checkout/merge -
-references the last folder/branch you accessed. So this is a thing:
$ pwd /Users/kait/Downloads $ cd test $ pwd /Users/kait/Downloads/test $ cd - $ pwd /Users/kait/Downloads
Probably the biggest revelation I ever had once a colleague of mine told me.