clone the repo
git clone https://github.com/amitanshusahu/ghb && cd ghb
give execute permission
chmod 700 ghb
make the script available locally
sudo mv ghb /usr/local/bin/
- Saves Password (token) : you just need to provide it with your username and password once, it will save it and every time you will write
ghb
it will automatically push without asking for credentials - Checks For All The Common Pitfalls :
- checks if the repo is not initilized, it does it
- if the remote is not added, asks for it
- if not staged, it does it
- if not commited, commits
- sometimes in a hurry you push your master branch being in a different branch where you have made the changes, it also checks for this and it will push the current branch you are in to the remote, but there are sometimes you want to push a differnt branch from your master (or any other) whithout doing a
checkout branch
, you can do that too by explicitly typeing the branch nameghb branch-name
- Save Time : so you just need to type
ghb
that's it, even if the repo is not initialized. in that way it saves your time by doing the repetative tasks 😅
ghb ( gitgub ) is your friendly neighbour to push local repo to github. Automating the repetitive tasks " add, commit, push, username, token...". it's simple but useful 👼