Skip to main content

Command-line tool to delete merged Git branches

Project description

git-delete-merged-branches

A convenient command-line tool helping you keep repositories clean.

Installation

pip install git-delete-merged-branches

Features

  • Supports deletion of both local and remote branches
  • Supports workflows with multiple release branches, e.g. only delete branches that have been merged to all of master, dev and staging
  • Quick interactive configuration
  • Provider agnostic: Works with GitHub, GitLab and any other Git hosting
  • Takes safety serious

Safety

Deletion is a sharp knife that requires care. While git reflog would have your back in most cases, git-delete-merged-branches takes safety seriously.

Here's what git-delete-merged-branches does for your safety:

  • No branches are deleted without confirmation or passing --yes.
  • git push is used with --force-with-lease so if the server and you have a different understanding of that branch, it is not deleted.
  • There is no use of os.system or shell code to go wrong.
  • With --dry-run you can get a feel for the changes that git-delete-merged-branches would be making to your branches.
  • Show any Git commands run using --verbose.

Best Practices

  • Consider running git remote update --prune before using git-delete-merged-branches for best results.
  • Consider using ssh-agent if you don't want to enter your SSH key password for each git push when working with multiple remotes.

Support

Please report any bugs that you find.

Like this tool? Support it with a star!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-delete-merged-branches-1.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file git-delete-merged-branches-1.0.0.tar.gz.

File metadata

  • Download URL: git-delete-merged-branches-1.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

File hashes

Hashes for git-delete-merged-branches-1.0.0.tar.gz
Algorithm Hash digest
SHA256 592a6c90802102ef6d6695f7600a40a8f0d3306751456b4e0d851ac9824def90
MD5 9bccbfa776b070044f3a3b7eb8eaaa62
BLAKE2b-256 3f6c878f6d9b73660332ba879d070f66fceb973ac3ffbf3d0f34dc76dda0f484

See more details on using hashes here.

File details

Details for the file git_delete_merged_branches-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: git_delete_merged_branches-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

File hashes

Hashes for git_delete_merged_branches-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c84f85e7db76e7723e87de3f0d20fc9a88c3216f803299c6639d698c4242599e
MD5 9d0263cf9a70de1cf14897ee2c2be172
BLAKE2b-256 031ddddbfb43967f83e277c7b65b3b57002f94b29801c4540b0ac8be42552566

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page