Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marionauta/git-brrr
Utility to remove local git branches that have already been merged.
https://github.com/marionauta/git-brrr
git git-commands
Last synced: about 2 months ago
JSON representation
Utility to remove local git branches that have already been merged.
- Host: GitHub
- URL: https://github.com/marionauta/git-brrr
- Owner: marionauta
- License: mit
- Created: 2020-11-18T08:40:09.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-09T10:31:19.000Z (8 months ago)
- Last Synced: 2024-05-09T11:46:45.295Z (8 months ago)
- Topics: git, git-commands
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-brrr
Utility to remove local git branches that have already been merged.
## Usage
```sh
git brrr
```## Install
Clone this repo and make sure the `git-brrr` file has executable permissions.
```sh
git clone https://github.com/marionauta/git-brrr
cd git-brrr
chmod +x git-brrr
```Then, move the `git-brrr` file to somewhere in your PATH. That means, move it to some directory listed afer running:
```sh
echo $PATH | tr ":" "\n"
```## Configuration
The command won't delete your default branch, if set. You can check what this value is by running:
```sh
git config init.defaultBranch
```You can set custom **protected branches** globally or per project. Multiple branches are separated by a `|` (pipe).
```sh
git config --global brrr.protectedBranches "develop"
git config brrr.protectedBranches "develop|staging" # Overrides global settings
```