Somehelpfulutilities - axxia/axxia_yocto_linux_4.9 GitHub Wiki
bashrc additions
To use git-prompt.sh and git-completion.sh you need to add these lines to your ~/.bashrc file
source $HOME/.git-prompt.sh
source $HOME/.git-completion.sh
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
git-prompt.sh
This little shell script will set your prompt to show the branch name that you currently have checked out. This helps prevent accidental merges to the wrong place and many other unintended git operations.
Copy/paste the text from here into a file in your $HOME directory named .git-prompt.sh
git-completion.sh
And this script will provide bash style tab-completion when typing git commands.
Copy/paste the text from here into a file in your $HOME directory named .git-completion.sh
git-up
Git-up is a very useful utility for helping to keep your local clone of a repositories current with the upstream "origin". It will check for updates on all the branches you are tracking and sync them for you. The original version is written in Ruby, but if you don't already have Ruby installed on your system then I recommend the Python version. The installation instructions are here.