Skip to content

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

License

Notifications You must be signed in to change notification settings

neumantm/gitPruneBranches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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";
  ...
}

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published