git-helper

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

README

GitHelper

A golang cli tool for automating GIT work in multiple repositories

Are you tired of typing the same git commands on multiple repositories of your project? Are you tired of opening and updating Pull Requests for each repository?

This cli may be your solution to help you save time.

Installation

Change the version for the version you want (withouth initial v)

Linux amd64
export GITHELPER_VERSION=0.3.0
curl -L "https://github.com/felipem1210/git-helper/releases/download/v${GITHELPER_VERSION}/git-helper_${GITHELPER_VERSION}_linux_amd64.tar.gz" |tar xzv -C /tmp
sudo mv /tmp/git-helper /usr/local/bin/git-helper
chmod +x /usr/local/bin/git-helper
MacOS amd64
export GITHELPER_VERSION=0.3.0
curl -L "https://github.com/felipem1210/git-helper/releases/download/v${GITHELPER_VERSION}/git-helper_${GITHELPER_VERSION}_darwin_amd64.tar.gz" |tar xzv -C /tmp
sudo mv /tmp/git-helper /usr/local/bin/git-helper
chmod +x /usr/local/bin/git-helper
Envars needed
  • Define the envar WORKING_DIR. This must be the folder where you have all the repositories you want to manage.
export WORKING_DIR=$(pwd)
  • Define GIT_ACCESS_USER and GIT_ACCESS_TOKEN with your Github Username and Token

Git integration

You can run local git commands alongside multiple repositories that are inside the $WORKING_DIR:

  • clone (Repos grouped in a Github Org).
  • checkout
  • add all new content
  • create new branch locally
  • pull
  • commit
  • reset to HEAD
  • rebase
  • push
  • fetch
  • status

Github integration

You can run following actions in github:

  • Create repositories.

You need to provide a json file with info of the repos you want to create. Check this json file with the example of the file. Place the file in your $WORKING_DIR

cp examples/json-files/new_repos.json $WORKING_DIR

After creating the repositories a file repos_info.json will be created. don't erase it

  • Create/update/merge pull requests

You need to provide a json file with info of the PRs you want to create. Check this json file with the example of the file. Place the file in your $WORKING_DIR

cp examples/json-files/new_prs.json $WORKING_DIR

After creating the repositories a file pr_info.json will be created. don't erase it

If you want to update you can only update these fields: title, body, state, base, maintainer_can_modify.

Gitlab integration

COMING SOON

Usage

Use the --help

git-helper --help

Documentation

Overview

Copyright © 2022 Felipe Macias felipem1210@gmail.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL