Some useful git configurations to candy eye it:
- Email and username:
git config --global user.name "My Name"
git config --global user.email my@email.com
- Aliases:
git config --global alias.st status
- Colors:
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
- Editor:
git config --global core.editor emacs
Setting up the shell to show which branch you are using. Just add this line into your .bashrc:
export PS1="\w \`ruby -e "print (%x{git branch 2> /dev/null}.lines
.grep(/^\*/).first ||'').gsub(/^\* (.+)$/, '(\1) ')"\`\[\033[37m\]$ "
Don’t forget to install ruby in order to get it working.
Pretty cool!!
Thanks, dude!