quicker way to use git(1) written in POSIX shell and awk

Kevin "The Nuclear" Bloom d141d2371c fixed last commit's mistake 2 months ago
LICENSE 8e43edb486 Initial commit 5 months ago
README.md d9c2c3c40d added more info 4 months ago
makefile 007ba7cb0d removed random echo 2 months ago
qg d141d2371c fixed last commit's mistake 2 months ago

README.md

Quick Git (qg)

Quick git is a git(1) frontend written in POSIX shell and awk.

Goals:

  • 100% POSIX compliance
  • provide a quick-to-type interface to git(1)
  • be as powerful as possible
  • allow unknown commands to pass through to git(1)
  • don't suck

Quick Syntax Guide

qg attempts to keep it's commands as the first letter of the git(1) command: commit is c, pull is p, status is s, diff is d, etc. There are some many commands with the same starting letter: push and pull, commit and checkout, etc. In that case, qg will attempt to keep commands that effect the remote with a capital letter and local commands with a lower case: P for push, C for checkout, etc. There are some exceptions such as S for stash.

qg commands are always singular letters and their arguments are as well -- unless the command excepts numbers such as the a (add) command. qg commands are also always concatenated together without any spaces such as a1-2cP (add files 1 through 2, commit, and push) or Sp (stash pop). Note that any indicator that isn't qg's should have a space such as b ${branch} (branch ${branch}) or Sp 0 (stash pop 0). The stash commands use their own ids and are not related to the numbers listed by the s command and accepted by the a command.

Examples:

Want to run git status

$ qg s
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
1.	modified:   qg

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
2.	modified:   README.md
3.	modified:   qg

Untracked files:
  (use "git add <file>..." to include in what will be committed)

Note the numbers on the left side of the output on the lines that contain files.

Want to add certain files, commit, and then push all in 1 command:

$ qg a1-3cP

Type the commit message and boom, it's pushed.

Want to pop a stash:

$ qg Sp 0

Where 0 is the stash id.