https://github.com/hyperia-sk/remote-branch-housekeeping
Simple and efficient way to delete remote branches from git repository.
https://github.com/hyperia-sk/remote-branch-housekeeping
branch cleaner git git-branch git-branching git-merge git-mergetools housekeeping remote
Last synced: 4 months ago
JSON representation
Simple and efficient way to delete remote branches from git repository.
- Host: GitHub
- URL: https://github.com/hyperia-sk/remote-branch-housekeeping
- Owner: hyperia-sk
- License: mit
- Created: 2017-07-21T19:22:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-10T07:06:46.000Z (almost 8 years ago)
- Last Synced: 2025-03-30T13:05:14.610Z (8 months ago)
- Topics: branch, cleaner, git, git-branch, git-branching, git-merge, git-mergetools, housekeeping, remote
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 15
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
## GIT Remote Branch Housekeeping
[](https://travis-ci.org/hyperia-sk/remote-branch-housekeeping) [](https://codecov.io/gh/hyperia-sk/remote-branch-housekeeping)
> `git remote-branch-housekeeping` is a simple and efficient way to delete remote (`--merged` or `--no-merged`) branches from git repository.

## Usage
```bash
git remote-branch-housekeeping
# or
remote-branch-housekeeping
```
#### Parameters
```
remote-branch-housekeeping [ -f | -r | -d | -b | -n ]
-d , --days
Defines days, default 14.
-b , --branch
Branch name, default "master".
-r , --remote
Remote name, default "origin".
-n, --no-merged
Delete only branches that are not merged.
-f, --force
Don't ask for confirm to delete branches.
```
## Installation
```bash
git clone https://github.com/hyperia-sk/remote-branch-housekeeping.git && cd remote-branch-housekeeping
```
Open up the cloned directory and run:
#### Unix like OS
```bash
sudo make install
```
For uninstalling
```bash
sudo make uninstall
```
For update/reinstall
```bash
sudo make reinstall
```
#### OS X (homebrew)
@todo
#### Windows (cygwin)
```bash
C:\cygwin\bin\bash installer.sh
```
For uninstalling
```bash
C:\cygwin\bin\bash uninstaller.sh
```
## System requirements
* Unix like OS with a proper shell
* Tools we use: git ; perl ; grep ; sort ; sed ; head ; wc ; xargs ; date
#### Dependences
* [`perl`](https://www.perl.org/get.html) `apt install perl`
## Contribution
Want to contribute? Great! First, read this page.
#### Code reviews
All submissions, including submissions by project members, require review.
We use Github pull requests for this purpose.
#### Some tips for good pull requests:
* Use our code
When in doubt, try to stay true to the existing code of the project.
* Write a descriptive commit message. What problem are you solving and what
are the consequences? Where and what did you test? Some good tips:
[here](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message)
and [here](https://www.kernel.org/doc/Documentation/SubmittingPatches).
* If your PR consists of multiple commits which are successive improvements /
fixes to your first commit, consider squashing them into a single commit
(`git rebase -i`) such that your PR is a single commit on top of the current
HEAD. This make reviewing the code so much easier, and our history more
readable.
#### Formatting
This documentation is written using standard [markdown syntax](https://help.github.com/articles/markdown-basics/). Please submit your changes using the same syntax.
#### Tests
```bash
make test
```
## Licensing
MIT see [LICENSE][] for the full license text.
[read this page]: https://github.com/hyperia-sk/remote-branch-housekeeping/blob/master/CONTRIBUTING.md
[landing page]: https://github.com/hyperia-sk/remote-branch-housekeeping
[LICENSE]: https://github.com/hyperia-sk/remote-branch-housekeeping/blob/master/LICENSE