Skip to content

matejbukovsky/git-branch-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

GIT - branch-cleaner

The script is helpfull when you want to delete batch of branches. It finds all remote/local branches by the author email and ask you for deletion.

Getting started

On Linux

  1. Clone the repo. to your home folder.

  2. Change the default settings:

# defaults
REPOSITORY="local"
AUTHOR="[email protected]"
PROJECT_FOLDER="current"
  1. Add following code to your ~/.bash_aliases. alias git-clean='sh ~/git-branch-cleaner/git-branch-cleaner.sh' The name of alias is up to you.

  2. Reload aliases in CLI. source ~/.bash_aliases

  3. Now when you go to project folder, the git-clean command execute git-branch-cleaner.

  4. You can run it with some parameters overwriting default settings. Overview of options also is under git-clean man cmd:

  • -a - Author of the repositories. (email)
  • -r - You can set local or remote GIT repositories.
  • -pf - Define path to git repository. Usually root of your project. When passed value is current, the branch cleaner is looking for .git folder in current dir.

About

GIT - branch cleaner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages