GithubHelp home page GithubHelp logo

shoenig / keep-branches Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 44 KB

Prune local git repository of unwanted branches

License: Mozilla Public License 2.0

Go 76.56% Makefile 23.44%
branch feature-branch git prune repository

keep-branches's Introduction

keep-branches

keep-branches is a CLI tool used to prune local git repository of unwanted branches.

The tool will prune branches that are

  • not main
  • not the current branch
  • not listed as an argument

GitHub

Install

The keep-branches tool is available to download from the Releases page.

It is pre-compiled for many operating systems and architectures including

  • Linux
  • Windows
  • MacOS
  • FreeBSD
  • OpenBSD

Build

The keep-branches command can be compiled from source using the Go tool chain.

Short version:

go install github.com/shoenig/keep-branches@latest

Examples

Keep only main

keep-branches

Keep main, x-my-branch, x-foo-branch

keep-branches x-my-branch x-foo-branch

Print help message

keep-branches -help

Contributing

The github.com/shoenig/keep-branches command is always improving with new features and bug fixes. For contributing please file an issue or pull request.

License

The github.com/shoenig/keep-branches command is open source under the MPL 2.0 license.

keep-branches's People

Contributors

shoenig avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.