W-Mai / git_rnd_name

Generate a random git branch name based on remote name you given.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git_rnd_name

Description

This is a tool to generate random names for git repositories.

This is useful when you want to create a PR but you don't know what name you should use.

Features

  • Generate random names for git repositories.
  • Create new branch with random names.
  • Support verbose mode.
  • Support custom local repository path.
  • Support show all branch created by this tool (fit the creation rules by this tool).

You'll get a random name like this:

w-mai@MacBook-Pro ~/P/X/E/lvgl (πŸ˜€)> git branch | column
  ☹️				 😟
  πŸ‘ŒπŸ»				 😣
* πŸ˜€				 😩
  😁				 😫
  😏				 πŸ™
  πŸ˜’				 πŸ€“
  πŸ˜”				 🀩
  πŸ˜•				 πŸ₯³
  πŸ˜–				 πŸ₯Ί
  πŸ˜—				 🫒

or

w-mai@MacBook-Pro ~/P/X/E/lvgl (πŸ˜€)> grn -a | column
  ☹️				 😟
  πŸ‘ŒπŸ»				 😣
  πŸ˜€				 😩
  😁				 😫
  😏				 πŸ™
  πŸ˜’				 πŸ€“
  πŸ˜”				 🀩
  πŸ˜•				 πŸ₯³
  πŸ˜–				 πŸ₯Ί
  πŸ˜—				 🫒

Installation

cargo install git_rnd_name

Usage

grn --help
Generate a random git branch name based on remote name you given.

Usage: grn [OPTIONS] [REMOTE]

Arguments:
  [REMOTE]  remote names

Options:
  -c, --repo <REPO>  local repo path
  -b, --branch       create new branch
  -a, --all          List all branches create by this tool and exit
  -v, --verbose...   verbose mode
  -h, --help         Print help
  -V, --version      Print version

Example

Chane to your git repository directory.

grn
grn origin

You will get a random name like 😁

grn origin -b

You will get a random name like πŸ˜‚ and a new branch will be created.

grn origin -c /path/to/repo

You will get a random name like πŸ€”οΈ in /path/to/repo. If you add -b option, a new branch will be created.

How to build

  1. Star and fork this repository
  2. Clone your forked repository like git clone https://github.com/yourname/git_rnd_name.git
  3. cd git_rnd_name
cargo build --release

License

MIT

About

Generate a random git branch name based on remote name you given.

License:MIT License


Languages

Language:Rust 100.0%