git

Git Alias

Git Alias: I thought this deserves it’s own little page. Following will create an alias for git add, commit, and push git config alias.acp '! acp() { git add . && git commit -m \"$1\" && git push ; } ; acp' Use it like this: git acp "your commit message" Depending on your setup, you may also want to add git pull before you git add, but I am sure you can figure out how to do that.

Git Howto

Git Setup Remote Server Go to your web root directory cd /var/www/ identify your self to git git config --global user.name "Your Name" git config --global user.email "alias@example.com" Create git git init Create a live branch git branch live Make the live branch active git checkout live Local Go to your working directory cd /var/www/ identify your self to git git config --global user.name "Dennis T Kaplan" git config --global user.

git branch on bash line

This little code, if placed in to your ~/.bash_profile file will reveal what git branch you are working on. parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/(1)/' } if [[ $EUID -ne 0 ]]; then PS1="w$(parse_git_branch) $ " fi