News for hackers. Stuff that matters.
Re:Learn Git Branching by drmohundro on Sunday September 15, 2024 @05:09PM (#41550423)
I found these online and added them to my gitconfig at one point... I can't take credit for them. Integrating fzf with git makes working with branches even better (with fuzzy matches for checking out as well as deleting branches)...

cob = !BRANCH=`git recent --no-color | fzf` && git checkout ${BRANCH}

db = !BRANCH=`git branch --no-color | fzf` && git branch -d ${BRANCH}

dbf = !BRANCH=`git branch --no-color | fzf` && git branch -D ${BRANCH}

Re:Learn Git Branching by gcarvalho on Sunday September 15, 2024 @06:01PM (#41550811)
There’s fzf-git.sh [1], which is a collection of bindings to invoke fzf for things like branches, commits, tags, etc. I use it pretty often.

[1] https://github.com/junegunn/fzf-git.sh