quicker way to use git(1) written in POSIX shell and awk
Kevin Bloom d14c2439c6 fixed issue where .gt-temp.txt wouldn't get removed | 6 kuukautta sitten | |
---|---|---|
LICENSE | 1 vuosi sitten | |
README.md | 6 kuukautta sitten | |
makefile | 10 kuukautta sitten | |
qg | 6 kuukautta sitten |
Quick git is a git(1) frontend written in POSIX shell and awk.
Goals:
Works:
Doesn't Work:
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.
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.
$ qg a1-3cP
Type the commit message and boom, it's pushed.
$ qg Sp 0
Where 0 is the stash id.