Fran García-Linares
December 2017
1
2
3
4
5
Git and GitHub
Workflow practices (branching, PRs, merging, etc)
Issues when working with other people (aka git conflicts)
Issues when working with multiple branches (permissions, changed files, etc)
Q & A
# Git branch in prompt.
parse_git_branch() {
git symbolic-ref HEAD 2> /dev/null | sed -e 's/^refs\/heads\///g' -e 's/^/ \(/' -e 's/$/\)/'
}
RESET="\[\017\]"
NORMAL="\[\033[0m\]"
YELLOW="\[\033[33;1m\]"
export PS1="${RESET}${NORMAL}\u@MacBookPro :: \w${YELLOW}\$(parse_git_branch) ${NORMAL}$ "
git checkout prod && git pull
git checkout BRANCH && git merge prod
chmod 777 sites/default
git stash / git stash pop
rm -rf path/to/folder
gm*
* Alias list. Similar to:
git submodule update --init + git submodule sync