Skip to content

Instantly share code, notes, and snippets.

@kemokemo
Created June 18, 2024 14:07
Show Gist options
  • Save kemokemo/5de9e284fd261ca74e13b2cec4cbc1b6 to your computer and use it in GitHub Desktop.
Save kemokemo/5de9e284fd261ca74e13b2cec4cbc1b6 to your computer and use it in GitHub Desktop.
Interactive git operations on the PowerShell
git branch -a | fzf | % { git checkout $_.Trim() }
git branch | fzf -m | % { git branch -d $_.Trim() }
@kemokemo
Copy link
Author

You should use $_.Trim() instead $_, because the output of the fzf has prefix and suffix spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment