Releases: davidraviv/gh-clean-branches
Support multilingual environments with git
The results will appear correctly also in an environment with the Chinese language.
✨ Thanks @BlackHole1
Support multiple upstream
- The extension now supports single or multiple upstream.
- Minor: Reduced unnecessary logs in case of success, errors will always display.
Upgrade:
gh extension upgrade clean-branches
Validate against multiple upstream
Add validation to prevent crashing on multiple upstream.
The script supports a single upstream.
Related to issue #11
Add `--verbose` flag
This version slightly changes the script output.
Listing the existing branches on local and remote are now displayed only with the --verbose
flag.
Thanks to @rizowski for the PR.
Add `--force` flag [fix log message]
Fix log message if branch fails to delete.
Add `--force` flag
Adding --force
flag to execute git branch -D
forcing deletion regardless if upstream branches have local changes.
Thanks to @rizowski for the PR.
Reduce dependencies list
Converted the array manipulation logic to zsh
, now the script no longer depends on Node.js!
Stay on the current branch when the run completes
When the script run completes, stay on the branch we started with unless it was deleted, then stay on the default branch
Before this change, the script would always completes on the default branch.
Thanks @pbeeson for the feature request.
Fix bug in finding default branch
In some repositories (probably repositories where the default branch was renamed) the following error may occur:
fatal: ref refs/remotes/origin/HEAD is not a symbolic ref
This fixes the way of obtaining the default branch.
Please report an issue if you get an error and include the list of branches:
git branch -a | cat
Default branch agnostic
The script is now agnostic to the default branch name (previously assumed that it is main
).
Thanks @cottand for the pull request!