Skip to content

Instantly share code, notes, and snippets.

@BerkeKaragoz
Created August 15, 2023 09:18
Show Gist options
  • Save BerkeKaragoz/ad468fd756153ad95c2bd4179fa30ce5 to your computer and use it in GitHub Desktop.
Save BerkeKaragoz/ad468fd756153ad95c2bd4179fa30ce5 to your computer and use it in GitHub Desktop.
Add `/done` prefix to local branches
for branch in $(git branch | sed 's/\*//'); do
if [[ $branch != */* && $branch != "master" && $branch != "main" ]]; then
git branch -m $branch done/$branch
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment