God parses the available Git commands from the retrieved list (git help) and turns them into an easy-to-type, one or two char format at the execution time.
Shortcuts of commonly used git commands are supported for simplifying the usage and speeding up typing even more.
AUR (god-git)
Installation can be made with a AUR helper tool like Trizen or yay.
trizen god-git
Install the dependencies.
go get -d ./...
Set the required Go environment variables if not set for the installation. See this link for setting environment variables globally.
export GOPATH=~/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN
And finally install the god.
go install
[god ~]$ ?
+---------+-----------------------------+
| COMMAND | DESCRIPTION |
+---------+-----------------------------+
| exit | Exit shell |
| git | List available git commands |
| sc | List git shortcuts |
| alias | Print shell or git aliases |
| help | Show this help message |
| version | Show version information |
| clear | Clear the terminal |
+---------+-----------------------------+
[god ~]$ git
+---------+----------+
| COMMAND | GIT |
+---------+----------+
| c | clone |
| i | init |
| a | add |
| m | mv |
| r | reset |
| rm | rm |
| b | bisect |
| g | grep |
| l | log |
| s | show |
| st | status |
| bn | branch |
| ck | checkout |
| cm | commit |
| d | diff |
| mr | merge |
| ra | rebase |
| t | tag |
| f | fetch |
| p | pull |
| ps | push |
| mt | master |
| o | origin |
+---------+----------+
Example output of shortened git commands.
[god ~]$ sc
+----------+--------------------------------+
| SHORTCUT | COMMAND |
+----------+--------------------------------+
| aa | add -A |
| cmt | commit -m |
| rmt | remote -v |
| rr | rm -r |
| ll | log --graph --decorate --all |
| lo | log --graph --decorate |
| | --oneline --all |
| ls | ls-files |
+----------+--------------------------------+
Git shortcuts.
Other terminal commands can be executed with adding a '#' character before the command. It's necessary for non-git commands because the god executes all other terminal inputs with git.
[god ~]$ # ps
PID TTY TIME CMD
23965 pts/2 00:00:00 bash
30306 pts/2 00:00:00 go
30361 pts/2 00:00:00 god
30519 pts/2 00:00:00 ps
[god ~]$ # pwd
/home/k3/god
[god ~]$ st
On branch master
modified: README.md
no changes added to commit (use "git add" and/or "git commit -a")
[god ~]$ a README.md
[god ~]$ cmt "README.md updated~"
[master fba7e79] README.md updated~
1 file changed, 14 insertions(+)
[god ~]$ ps o mt
To https://github.com/KeyLo99/God.git
45e8aba..fba7e79 master -> master
Q: So it's an application just to create some shortcuts to git commands? Did you heard of git aliases?
A: The project aims to provide a interactive shell that have built-in shortened Git commands and shorcuts. Benefits of it depends on your workspace, people like to use Git in command line and work with multiple shells can use it as a helper tool. Unlike the git aliases, it only needs one execution and there will be no need for typing 'git' anymore for using git. Here's a screenshot of my workspace while using god in a separate terminal.
- Support adding custom shortcuts.
- Terminal autocomplete feature.
GNU General Public License v3. (see gpl)
Copyright (C) 2019 by KeyLo99 https://www.github.com/KeyLo99