#git-essential
Need some useful shortcuts for git out of the box, but you're tired of reading through big projects with dark-magic mumbo-jumbo? You're in the right place! Only purpose of this script is to add few essential shortcuts to git, that will not overwhelm you and will speed up your work.
s
is shortcut forstatus -sb
. Callinggit s
will give you easy to read, clean info about status of your working tree and index. First column shows you info about file state inindex
, and second column shows info about file status in working tree.b
meansbranch -avv
. Callinggit b
will output you list of your local and remote branches, along with basic info (last commit, last commit message).l
stands forlog --oneline --decorate
.git l
gives you log of commits. One line per commit. Nasty and easy to read.g
is shortcut forlog --oneline --decorate --graph
. It will give you the same output plus ascii graph of branches on the left.co
is now yourcheckout
. Want to checkoutprod
branch? Just hitgit co prod
. Want to create newtest
branch?git co -b test
.
Also included - git output coloring.
Easy peasy! Just follow these steps:
- Clone this repository.
- Navigate to freshly created
git-essentials
folder. - Add
execute
permissions to git-essentials.sh (for example, in command line:chmod u+x git-essentials.sh
) - Execute!
./git-essentials.sh
- Test it! Just try to run
git b
orgit s
. Looks good, isn't it?