Aliases and helpers for many git related tasks to speed up my workflow
Originally adapted from GitGoodies, my version has some different functions and generally focuses on speed.
There is still a lot TODO, i'll get around to it as I need it :)
curl -fsSL git.io/fpEqU | bash
command | does |
---|---|
gg i | git init |
gg s | git status |
gg f | git fetch |
gg a | git add -A |
gg a <file> |
git add <file> |
gg c | git commit (prompts for conventional commit style commits) |
gg ca | git commit --amend |
gg can | git commit --amend --no-edit |
gg ch <thing> |
git checkout <thing> |
gg cm | git checkout default branch eg. main or master |
gg pl | git pull |
gg cpr | git fetch && git rebase origin/master |
gg p | git push |
gg pf | git push force |
gg l | git history oneline |
gg lc | git history latest commit |
gg r <number> |
git rebase HEAD~<number> -i |
gg rr | reset branch to remote |
gg st | add all files and stash |
gg stp | stash pop latest |
gg clean | delete local branches not on master |
gg b <name> |
create and checkout branch <name> , if exists check it out |
gg bd <name> |
delete branch |
gg cf <scope> |
git commit fixup <scope> |
gg pr | create new github pull request for current branch |
gg prl | output changed since master in easy pr format to clipboard |
gg o | open repo url |
gg t | create a tag |
gg td <name> |
delete a tag <name> |
gg z <commands> |
combo commands, eg. gg z a c p for gg a && gg c && gg p |
Make sure you clone recursivley as am using submodules for bats
git clone --recursive [email protected]:csi-lk/gg.git
All functions are in the one file, the gg bin
Unit testing using bats with support and assert libs loaded as submodules
All tests are defined in the one file
Install bats with brew (macOS)
brew install bats
bats test
🧔 Be sure to checkout my other repos and website / blog