Created
June 18, 2024 14:07
-
-
Save kemokemo/5de9e284fd261ca74e13b2cec4cbc1b6 to your computer and use it in GitHub Desktop.
Interactive git operations on the PowerShell
This file contains 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
git branch -a | fzf | % { git checkout $_.Trim() } |
This file contains 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
git branch | fzf -m | % { git branch -d $_.Trim() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should use
$_.Trim()
instead$_
, because the output of the fzf has prefix and suffix spaces.