A command line application to simplify the git workflow on committing, pushing and others commands.

Overview

Git-Suite

A command line application to simplify the git workflow on committing, pushing and others commands.

Prerequisites

Install Node Package Manager npm and Node Version Manager nvm. Have git installed and configured on your machine.

Info

Exemple

Runs the command

$ gs -a -m "initial commit" --ft -p main -f

to get the flowing:

$ git add .
$ git commit -m "feat: initial commit"
$ git push -f origin main

Simple as that!

How to use

  1. Clone this repo:
$ git clone https://github.com/LucasGobatto/git-suite
  1. On folder /git-suite run nvm use and npm install;
  2. Install globally:
$ npm install -g

Done! To see the list of all valid commands on terminal, run:

$ gs --help

Valid Commands

1. Git add: gs -a | -add [<file>,<file>] or - runs git add . by default. Specify files to add concatenating the paths with a comma, like gs -a path/to/file1.js,path/to/file2.js;

2. Git commit: gs -m | -message "message" [--ft | --fx | --c | --e] - runs git commit -m "message". If the commit type flag is specified, the final commit message will be:

  • --ft --> "feat: message";
  • --fx --> "fix: message";
  • --c --> "chore: message";
  • --e --> "enhance: message";
  • --d --> "docs: message";

3. Git push: gs -p | -push [<branch-name>] [-f | -force] - runs git push origin <branch-name>. The force flag is optional;

Warning!

Not providing the branch name will push all local changes, including the changes from others branchs.

4. Git reset HEAD: gs -rh | -reset-head [<number>] - runs git reset HEAD~<number>. By default, with remove 1 commit from the HEAD.

5. Git rebase: gs -r to-rebase-branch head-branch - runs:

$ git checkout head-branch
$ git pull
$ git checkout to-rebase-branch
$ git rebase to-rebase-branch

Runs the rebase process. It can be triggered within any branch, precisely because it makes the checkouts on the mentioned branchs, ensuring that the rebase process is performed to the correct ones.

Note: If any conflicts occur in the rebase process, it will stop to resolve the conflicts. After rebase, run gs -p -f to push the current branch.

6. Git checkout: gs -c <branch-name> - runs git checkout branch-name. Change to "brach-name" branch. It is allowed to create a new branch running gs -cb branch-name.

You might also like...

A Discord.JS Command Handler to handle commands eaiser

TABLE OF CONTENTS Installation Setup Changing Default Prefix Creating a Command Usage of minArgs and maxArgs Syntax Errors Global Syntax Errors Per Co

Jun 8, 2022

A browser extension to simplify web pages and hide distracting things like hide cookie banners, auto-playing videos, sidebars, etc

A browser extension to simplify web pages and hide distracting things like hide cookie banners, auto-playing videos, sidebars, etc

Unclutter Browser Extension A browser extension to simplify web pages and hide distracting things like hide cookie banners, auto-playing videos, sideb

Jan 9, 2023

A tool to simplify importing custom assets in Minecraft

BAMO - Block And Move On A tool to simplify importing custom assets in Minecraft Currently only allows you to quickly prototype models in-game, but fu

Jul 15, 2022

'event-driven' library aims to simplify building backends in an event driven style

'event-driven' library aims to simplify building backends in an event driven style

'event-driven' library aims to simplify building backends in an event driven style(event driven architecture). For message broker, light weight Redis Stream is used and for event store, the well known NoSQL database, MongoDB, is used.

Jan 4, 2023

Wen? Now! A library to simplify your Web3 data fetching.

Wen Connect? Now! Minimalistic library for Web3 user interfaces. Seamless connection flows to Metamask. Stateless sessions that work anywhere (client,

Jul 20, 2022

It's a javascript Class which contains utility methods that simplify working with google maps web SDK

About GoogleMapsJSHelper It's a javascript Class which contains utility methods that simplify working with google maps web SDK Note: i used ES7 Class

Jul 23, 2022

πŸ›« TypeScript Starter template to simplify creating your next npm package.

TypeScript Starter Kit This is an opinionated TypeScript Starter kit to help kick-start development of your next npm package. πŸ’‘ Get Started Luckily,

Sep 27, 2022

πŸ›« TypeScript Starter template to simplify creating your next npm package.

TypeScript Starter Kit This is an opinionated TypeScript Starter kit to help kick-start development of your next npm package. πŸ’‘ Get Started Luckily,

May 19, 2022

Simplify the installation of a Silverstripe Dev Environment.

silverstripe docker starter Simplify the installation of a Silverstripe Dev Environment. The silverstripe docker starter is based on the silverstripe/

Jul 7, 2022
Comments
  • There is no tracking information for the current branch.

    There is no tracking information for the current branch.

    Issue

    On linux-os systems, git pull does not works properly.

    Example

    $ gs -r chore/deploy-dev feature/iap-signin
    
    info: Running git checkout feature/iap-signin
    git: Switched to branch 'feature/iap-signin'
    
    git: package.json has not been modified.
    
    info: Running git pull
    git: hint: Pulling without specifying how to reconcile divergent branches is
    hint: discouraged. You can squelch this message by running one of the following
    hint: commands sometime before your next pull:
    hint: 
    hint:   git config pull.rebase false  # merge (the default strategy)
    hint:   git config pull.rebase true   # rebase
    hint:   git config pull.ff only       # fast-forward only
    hint: 
    hint: You can replace "git config" with "git config --global" to set a default
    hint: preference for all repositories. You can also pass --rebase, --no-rebase,
    hint: or --ff-only on the command line to override the configured default per
    hint: invocation.
    
    git: There is no tracking information for the current branch.
    Please specify which branch you want to merge with.
    See git-pull(1) for details.
    
        git pull <remote> <branch>
    
    If you wish to set tracking information for this branch you can do so with:
    
        git branch --set-upstream-to=origin/<branch> feature/iap-signin
    

    Print

    Screen Shot 2022-08-15 at 11 23 35 bug 
    opened by LucasGobatto 1
  • Fatal: The current branch has no upstream branch.

    Fatal: The current branch has no upstream branch.

    Issue

    On linux-os system, gs -p does not work properly.

    Exmple:

    $ gs -a -m "remove useless header" --fx -p
    
    info: Running git add .
    info: Running git commit -m "fix: remove useless header"
    git: 
    > [email protected] pre-commit
    > lint-staged
    
    
    git: [STARTED] Preparing lint-staged...
    
    git: [SUCCESS] Preparing lint-staged...
    
    git: [STARTED] Running tasks for staged files...
    
    git: [STARTED] .lintstagedrc.json β€” 1 file
    
    git: [STARTED] *.{js,jsx,ts,tsx} β€” 1 file
    
    git: [STARTED] eslint --fix
    
    gs -cgit: [SUCCESS] eslint --fix
    
    git: [SUCCESS] *.{js,jsx,ts,tsx} β€” 1 file
    [SUCCESS] .lintstagedrc.json β€” 1 file
    
    git: [SUCCESS] Running tasks for staged files...
    
    git: [STARTED] Applying modifications from tasks...
    
    ^R
    gs -git: [SUCCESS] Applying modifications from tasks...
    
    git: [STARTED] Cleaning up temporary files...
    
    git: [SUCCESS] Cleaning up temporary files...
    
    git: [feature/iap-signin b6d259a] fix: remove useless header
     1 file changed, 1 deletion(-)
    
    info: Running git push
    git: fatal: The current branch feature/iap-signin has no upstream branch.
    To push the current branch and set the remote as upstream, use
    
        git push --set-upstream origin feature/iap-signin
    
    
    error: Task exit with status 128.
    

    on Git:

    Screen Shot 2022-08-15 at 11 18 30 bug 
    opened by LucasGobatto 1
Owner
Lucas Gobatto
Lucas Gobatto
πŸ§˜β€β™€οΈ Chamomile simplifies issue and git tracking from the command line.

Chamomile What is Chamomile? Chamomile simplifies issue and git tracking from the command line. As of now the focus is bridging workflows involving Gr

Zev Stravitz 3 Aug 4, 2022
A GitHub Action for pushing to a repo.

action-gh-push A GitHub Action for pushing to a repo. ?? Usage Below is a simple example of step.if tag gating name: ci on: push jobs: build:

θΏ·ζΈ‘ 6 Feb 15, 2022
Contented is a Markdown-based authoring workflow that encourage developer authoring within its contextual Git repository.

Contented is a Markdown-based authoring workflow that encourage developer authoring within its contextual Git repository. npm i @birthdayresearch/cont

Birthday Research 44 Jan 7, 2023
A GitHub app to report failed workflow job actions and notify pull request creator with custom report message for the failed workflow job.

Workflow Reporter A GitHub App built with Probot that reports failed workflow job actions and notify the pull request creator with custom report messa

Divyanshu Shekhar 14 Nov 12, 2022
Workflow to re-trigger workflow of all open PRs when base updates

Workflow to re-trigger workflow of all open PRs when base updates

James Tan 4 Aug 28, 2022
All terminal commands in one place (you can Contribute to it by putting latest commands and adding Readme)

Terminal-Commands All basic terminal commands in one place Show some ❀ by some repositories You can contribute to this readme If you to contribute wit

Shehzad Iqbal 7 Dec 15, 2022
A good looking help command made with discord.js with select menus. Works with prefix and slash commands too!

fancy-help-command A good looking help command made with discord.js with select menus. Works with prefix and slash commands too! Dependencies: Select

LunarCodes 11 Dec 12, 2022
This plugin for Obsidian adds commands for increasing/decreasing the blockquote level of the current line or selection(s).

Blockquote Levels This plugin for Obsidian adds commands for increasing/decreasing the blockquote level of the current line or selection(s). Usage The

Carlo Zottmann 15 Dec 19, 2022
Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command

cypress-thenify Rationale Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command. Howev

Mikhail Bolotov 15 Oct 2, 2022