Skip to content
Cut-short long git commands
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
LICENSE
README.md
_install
commands.txt

README.md

Codacy Badge license

🅛🅐🅩🅨🅖🅘🅣 🤟

Tired of typing lengthy git commands? Well, if you are amongst who feel like me, this repo is a savior for you. This repo includes shorthand commands for the regular git commands which you can type in a jiffy.

- I'd advice beginners to learn git commands first hand before using any shortcodes or aliases

Installation

  1. Clone or Download the repo.
  2. Run ./_install to install
  3. If you see any permissions related errors try ➡️chmod 755 _install and run ./_install again. or any error please raise a PR 😅
  4. Type gb to verify the installation and you must see git related output. If not try re-starting your terminal and try again.

Short Codes List

Function Shortcode Can pass default params with the function ? Details
git push <remote> <current-branch> gph-this <remote> No Utility Function to push the current branch
git pull <remote> <current-branch> gpl-this <remote> No Utility Function to pull the current branch
Command Shortcode Can pass default params with this command ? Git Repo Link
git init [<options>] g! [<options>] Yes ℹ️
git add . g. Yes ℹ️
git branch gb Yes ℹ️
git branch -a gb-a Yes ℹ️
git branch -d gb-d Yes ℹ️
git branch -m <name> gb-name <name> Yes ℹ️
git checkout -b <name> gb-new <name> No, You can only pass branch-name and --track or --no-track ℹ️
git checkout -- . g!. No, Discards all your changes ℹ️
git blame gblame Yes ℹ️
git clone <url> gcl <url> Yes ℹ️
git commit -m <message> gc <message> No, it accepts only commit message ℹ️
git diff [--options] <commit> [--] [<path>…] gd [--options] <commit> [--] [<path>…] Yes ℹ️
git fetch [<options>] [<repository> [<refspec>…] gf [<options>] [<repository> [<refspec>…]] Yes ℹ️
git log --graph --decorate --all gl No ℹ️
git log --summary gl-s Yes ℹ️
git push [<options>] [<remote>] [<branch>] gph [<options>] [<remote>] [<branch>] Yes ℹ️
git push -f [<remote>] [<branch>] gph-f <remote> <branch> Yes ℹ️
git pull [options] [<repository> [<refspec>…]] gpl [options] [<repository> [<refspec>…]] Yes ℹ️
git remote [commands] [<...>] gr [commands] [<...>] Yes ℹ️
git remote -v gr-v It acceps only <show> and <update> ℹ️
git remote add <name> <url> gr-update <name> <url> It accepts options related to <add> ℹ️
git remote update gr-update Only accepts <prune> ℹ️
git remote remove <name> gr-remove <name> No other options are needed other than <name> ℹ️
git reset [<mode>] <head> greset [<mode>] <head> Yes ℹ️
git reset --hard <head> greset-h <head> Takes only <head> ℹ️
git revert [<options>] [<subcommands>] grevert [<options>] [<subcommands>] Yes ℹ️
git revert HEAD grevert-h This reverts last commit only, Use the above for reseting other commits eg., grevert head~2 ℹ️
git status [<options>…] [--] [<pathspec>…] gs [<options>…] [--] [<pathspec>…] Yes ℹ️
git stash [<command>] [<options>] gsh [<command>] [<options>] Yes ℹ️
git stash apply [--index] [<stash>] gsh-a [--index] [<stash>] Yes ℹ️
git stash list [<options>] gsh-l [<options>] Yes ℹ️
git stash clear gsh-c No It clears all the stash list ℹ️
git stash pop [--index] gsh-p [--index] Yes ℹ️
git stash drop [<stash>] gsh-d [<stash>] Yes ℹ️
git tag -l --sort=v:refname | tail -n8 gt No ℹ️
git add . && git commit -m g.c <message> No, it accepts only commit message ℹ️
git rebase [< All options>] grb [<All options>] Yes ℹ️
git show [<options>] [<object>] gsw [<options>] [<object>] Yes ℹ️

To Contribute

I have added commands that I use frequently and scope for new commands (Bash Aliases) is less. But if you are interested you can raise a PR or please follow this branch


Tasks

  • Add Bash file with basic commands
  • Add Install via npm WIP
  • Add Install via pip (If interested, work and raise a PR)

Fell free to suggest and report, Raise a PR with [report] or [suggest] labels

You can’t perform that action at this time.