Skip to content
/ gch Public

Git Commit Handler: A tool to handle git related commands easier.

License

Notifications You must be signed in to change notification settings

Scstechr/gch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCH: Git Commit Handler

MIT License

A tool to handle git related commands such as: git init, git commit, git diff, git add, git push

Overview

This tool makes it easier to execute certain git commands from terminal. Also, this gch aims for beginners of git by showing actual commands executed in specific color.

Install

$ brew tap scstechr/gch
$ brew install gch

Update

$ brew update; brew upgrade gch

How to Use

Show help

$ gch --help
gch v1.42 (compiled: 2019-09-24 11:24:47 UTC)
Usage: gch [OPTION]

Options:
  -i, --init        │ Run initializer
  -v, --verbose     │ Verbose option.
  -l, --log         │ Git log with option.
  -r, --remote      │ Choose which remote repository for push.
  -g, --gitpath     │ Path of dir that contains `.git`.
  -f, --filepath    │ Path/Regex of staging file/dir.
  -b, --branch      │ Commiting branch.
  -c, --commit      │ Commit.
  -p, --push        │ Push.
  -d, --diff        │ Open diff tool.
  --checkout        │ Handling checkouts.
  --reset           │ Reset.
  --pull            │ Pull from remote repository.
  --ls              │ List up tracking files/directories.
  --patch           │ Activate -p/--patch of git.
  --check           │ Check for updates.
  --version         │ Check version of gch.
  -s, --save        │ Save settings of gch.
  -h, --help        │ Show this message and exit.

Macro(s):
  @                 │ Current branch.

Simple command

$ gch -c

or equivalently,

$ gch --commit

This command executes git status --short, git diff --stat, git add . etc.
(shown as a blue line while executed)
Also, adds everything except configured in .gitignore or gch -f command.

Linked commands

Commands can be executed together in the manner below:

$ gch -cp

This executes git commit and git push.

Further example

gch -cp -r localhost

commit, then push to the remote called localhost.

gch -cp -b test -d

Shows diff first, then commit and push.

Developer's Note