Skip to content

pwlmaciejewski/branch-safe-name

Repository files navigation

branch-safe-name

Git branch names sanitizer

Installation

npm i -g branch-safe-name

Basic usage

$ branch-safe-name -l -s '-' Some long string that you copy-pasted from a browser
some-long-string-that-you-copy-pasted-from-a-browser

Git alias usage

Create an alias in your .gitconfig

[alias]
    brnew = !"f() { branch-safe-name -l -s '-' $@ | xargs git checkout -b; }; f"

Use it to create new branches

git brnew Fix for the bug #1234

It will create a new fix-for-the-bug branch for you 😎

About

Git branch names sanitizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published