Created
February 10, 2022 12:30
-
-
Save khaosdoctor/c89c27bdff56e116c537b4aa9202163d to your computer and use it in GitHub Desktop.
Few useful commands to streamline git usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Delete a branch interactively | |
git branch | fzf | xargs -n1 git branch -D | |
# Switch to branch interactively | |
git branch -a | fzf | sed 's+remotes/origin/++g' | xargs git switch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment