Skip to content
 
 

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

GitHub CLI helper

CLI utils for GitHub

Install

Using homebrew

brew install jq
brew install gnu-sed --with-default-names
brew install https://github.com/ghraw/mavimo/git-helper-gh/master/git-helper-gh.rb

From source

  1. Clone this repo
  2. Include bin directory in your path, or create symlinks:
    • ln -s $(pwd)/bin/git-gh-pr /usr/local/bin/git-gh-pr
    • ln -s $(pwd)/bin/git-gh-start /usr/local/bin/git-gh-start

Configuration

  1. Create a new GitHub token with "repo" permissions at settings page
  2. Configure each project using:
    • git config --add gh.username YOURNAME (replace YOURNAME with your GitHub username, eg. mavimo)
    • git config --add gh.project PROJECT/NAME (replace PROJECT/NAME with GitHub project name, eg.: mavimo/git-helper-gh. PAY ATTENTION as it's case-sensitive!)
    • git config --add gh.token GITHUB_TOKEN (replace GITHUB_TOKEN with your GitHub token generated above)

Usage

  1. Use git checkout BRANCH to switch to the branch you want to use as base (eg. develop)
  2. Use git gh-start ISSUE_ID to start to work on a new feature (replace ISSUE_ID with the issue ID you are start to working)
  3. After pushing the branch containing your desired changes, use git gh-pr to create a new pull request. A new tab in your browser will open with preconfigured PR label, author, title and content; you will only have to choose an assignee and add more information if needed.

About

Create helper script to use git

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages