Skip to content
/ gg Public

My Git Goodies: Fast Git Shortcuts (based off GitGoodies)

License

Notifications You must be signed in to change notification settings

csi-lk/gg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Goodies (gg)

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 :)

Installation

Linux / MacOS

curl -fsSL git.io/fpEqU | bash

Usage

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

Development

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

Testing

Unit testing using bats with support and assert libs loaded as submodules

All tests are defined in the one file

Setting Up

Install bats with brew (macOS)

brew install bats

Running

bats test

🧔 Be sure to checkout my other repos and website / blog

About

My Git Goodies: Fast Git Shortcuts (based off GitGoodies)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published