74
Advanced Terminal Tips and Tricks
(www.bitsand.cloud)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Same for
cd -
. Nice if you want to go to/etc/blah
, and then back to where you were.You can also use
pushd
andpopd
which will push and pop directories from a stack, if you need to do something more complex.Also, if you want to switch faster between branches, slap this in your
~/.gitconfig
under[alias]
:co = !git checkout $(git for-each-ref refs/heads/ --format='%(refname:short)' | fzf)
Presuming you've got
fzf
installed, you can nowgit co
(co = checkout) to get a menu with fuzzy find capabilities to switch between branches. Nice if branch names are long/similar/only-different-at-the-end.fzf
is dope.I have fzf-git for all of that, but honestly I don't ever use it, as I'm hardly ever switching between branches and tab complete is enough for me in most cases.