Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.
/ GitGudCLI Public archive

A CLI tool to help use the GitGud model

Notifications You must be signed in to change notification settings

HRKings/GitGudCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This tool was deprecated on 21/12/2021 - The new version is now written in Go, smaller and faster, it is the new official CLI, you can find the updated repository by clicking here

GitGud CLI [Deprecated]

GitGud

This repository is crossplatform CLI (Command Line Interface) for the GitGud modular git model. It contains a series of commands that help you use git more quickly and following the model.

Installation

Just download and drop the latest release into a folder, add it to your path and call the executable in your terminal of preference.

Usage

Using it is rather simple, after you have it on your path you can call it using: gitgud <module> <args>

The commands are divided into modules, just like the original model, the ones available at the moment are:

Commit Module

This module is equivalent to the Commit submodel and is the the default module so you can use the commands directly, without calling the module first.

Quickadd commit

This command tracks all files (using git add .) and commits the changes using the provided message, it will ask you to select the commit tag and flags via a arrow based menu.

gitgud commit quick "Commit subject"
gitgud commit q "Commit subject"

Obs.: You can use the -f or --full flag to generate a commit with body and footer

Obs.: You can use the --amend flag to amend your previous comment

Plain commit

This command will perform a simple commit ('git commit -m'), like the above it will ask you for the tag and flags.

gitgud commit plain "Commit subject"
gitgud commit p "Commit subject"

Obs.: You can use the -f or --full flag to generate a commit with body and footer

Obs.: You can use the --amend flag to amend your previous comment

Plain commit

This command will perform an add commit ('git commit -am'), like the above it will ask you for the tag and flags.

gitgud commit add "Commit subject"
gitgud commit a "Commit subject"

Obs.: You can use the -f or --full flag to generate a commit with body and footer

Obs.: You can use the --amend flag to amend your previous comment

Lint

This command is for linting commits, if you pass a commit message, it will validate the message and write a report on it explaining errors and warnings.

gitgud commit lint "Commit message"
gitgud commit l "Commit message"

Obs.: You can use the -f or --full flag to generate a commit with body and footer

Obs.: You can use the --amend flag to amend your previous comment

Generate

This command will generate a commit message based on your inputs (tag and flags).

gitgud commit generate "Commit subject"
gitgud commit g "Commit subject"

Flow Module

The Flow module is a wrapper to the Flow submodel, and its commands are equivalent to the how to provided in the model.

Full Init

This command is for when you just created a project and need to initialize the repository. It will create a normal git repository, then will create and commit an initial commit on the master, and derive a stable branch from it.

gitgud flow fullinit

Init

This command is for when you just already have a repository and wants it to follow the GitGud model, it will just create an stable branch off the master.

gitgud flow init

Start

This command will start a working branch for you to change to your hearts content. It will ask your for a working type and then branch off the master branch.

gitgud flow start "branch-name"

Publish

This command is for when you are working locally and need to push your branch in the internet. When provided a branch type and name, will push the branch to the origin.

gitgud flow publish "type/branch-name"

Complete

This command will merge the provided working branch into the master one and delete the original working branch, but will not do anything if the branch is in the origin, to encourage the use of pull requests for more organization.

If the working branch is a hotfix type, it will also merge into the stable branch before deletion.

gitgud flow complete "type/branch-name"

Compiling

You are welcome to clone and compile this repository. For this you will need .NET 5 on the latest version and compile it from the terminal using:

dotnet build -c Release

Contributing

You are more than welcome to contribute to this repository opening issues and pull requests, just remember to follow the specifications of the GitGud model, as this repository follows all of it (obviously).