Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.16 KB

README.md

File metadata and controls

53 lines (36 loc) · 1.16 KB

gitPruneBranches

A script to prune local git branches that are no longer needed

Requirements

  • git
  • bash

Installation

There are multiple possibilities to install this.

Standalone script

Just download the script gitPruneBranches.sh from this repo, make it executable and use it:

./gitPruneBranches.sh
# or
../path/to/gitPruneBranches.sh
# or
/path/to/gitPruneBranches.sh
# or

You may also put it into your PATH, allowing to just execute it with gitPruneBranches.sh.

Git Extension

You can also rename the script to git-pruneBranches and put it into your PATH. Then you can run it with git pruneBranches.

Nix Flake

This repo is also a nix flake and thus can be installed with e.g.

nix shell github:neumantm/gitPruneBranches

Then you can use it with git pruneBranches.

When including it in another flake (e.g. your NixOS configuration) it is advisable to reuse the nixpkgs flake you are already using:

{
  inputs.nixpkgs.url = "...";
  inputs.gitPruneBranches.url = "github:neumantm/gitPruneBranches";
  inputs.gitPruneBranches.inputs.nixpkgs.follows = "nixpkgs";
  ...
}