As we add more and more people to our team at NetPlenish, I find my self searching for a solid git workflow.
I have found a few pages that have inspired me.
- http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html
- http://nvie.com/posts/a-successful-git-branching-model/
- http://yehudakatz.com/2010/05/13/common-git-workflows/
- http://osteele.com/archives/2008/05/my-git-workflow
- http://scottchacon.com/2011/08/31/github-flow.html
- https://github.com/stevenharman/git-workflows
- http://tbaggery.com/2008/04/18/example-git-workflows-maintaining-a-long-lived-topic-branch.html
- http://nakedstartup.com/2010/04/simple-daily-git-workflow
- http://gweezlebur.com/2009/01/19/my-git-workflow.html
- http://stevenharman.net/blog/archive/2010/08/12/a-handful-of-git-workflows-for-the-agilist.aspx
- http://joemaller.com/990/a-web-focused-git-workflow/
- http://thinkvitamin.com/code/source-control/git/our-simple-git-workflow/
- http://nuclearsquid.com/writings/git-tricks-tips-workflows/
- http://tbaggery.com/2008/04/18/example-git-workflows-maintaining-a-long-lived-topic-branch.html
- http://lostechies.com/jimmybogard/2011/09/20/git-workflows-with-git-tfs/
- http://cakebaker.42dh.com/2009/03/08/a-git-workflow-for-single-developers/
- http://www.braintreepayments.com/devblog/our-git-workflow
- http://mojodna.net/2009/02/24/my-work-git-workflow.html
- http://randyfay.com/node/91
- http://www.aaronwest.net/blog/index.cfm/2011/6/7/Git-Workflows-Archiving-Old-Branches
- http://object.io/site/2011/enter-git-flow/
- http://www.vtk.org/Wiki/Git/Workflow/Topic
- http://solutions.trey.cc/2009/07/17/my-git-workflow/
- http://benbuckman.net/tech/10/09/drupal-dojo-929-git-workflows
- http://geewax.org/agile-git-workflow
- http://joslynesser.com/blog/archives/2010/09/06/git-workflow-for-small-teams/
- http://kyleslattery.com/entries/the-perfect-git-workflow-for-a-one-person-project
- http://www.andrewmoore.com/public/index.php/Mygitworkflow
- http://blogs.openshine.com/rmajadas/2011/05/25/openshine-git-workflow/
- http://wiki.sproutcore.com/w/page/12412905/Git%20Workflow-Introduction
- http://community.aegirproject.org/node/186
- http://community.kde.org/KDECore/Platform11/Git_Workflow
- http://www.jukie.net/bart/blog/git-amend
We are using GitHub to manage our team. Although BitBucket just realeased its support for git and its half the price… Might consider the move.
I will update this as soon as i figure out one that makes sense for us.
What I Do Now
Best Practices
- Commit Messages * Keep messages in present tense. * Keep message lines to 72 characters *
Git Aliases
[user]
name = Mark Evans
email = my@emailaddress.com
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
who = shortlog -s --
up = pull --rebase
sync = !git up && git push
stuff = !git add -A && git ci -a
shove = !git stuff && git sync
[push]
default = matching
[core]
quotepath = false
Git Prommpt
#Description: OSX Git Prompt - make your git repo prompts look pretty
#Installation: In your .bash_profile, add a line: source .gitprompt
#FileName: .gitprompt
#Owner: Mark Evans:
#Stolen From: http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt
c_cyan=`tput setaf 6`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`
parse_git_branch ()
{
if git rev-parse --git-dir >/dev/null 2>&1
then
gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')
else
return 0
fi
echo -e $gitver
}
branch_color ()
{
if git rev-parse --git-dir >/dev/null 2>&1
then
color=""
if git diff --quiet 2>/dev/null >&2
then
color="${c_green}"
else
color=${c_red}
fi
else
return 0
fi
echo -ne $color
}
#Branch First
#PS1='[\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]] \u@\[${c_red}\]\w\[${c_sgr0}\]:'
#Branch Last
PS1=' \u@\[${c_red}\]\w\[${c_sgr0}\]: [\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]]'
Resources
- Stack Overflow: Git for beginners