An example workflow with commands utilizing the git-flow extension package. git flow is a collection of extensions that provides high-level repository operations for Vincent Driessen's branching model.

#
# Scenario:  On develop branch, need to work on 'something'
#

# Create a new feature branch to work on 'something'
$ git flow feature start something
### ...work, add, commit, repeat...

# Finished the 'something' work
$ git flow feature finish something

#
# Scenario:  While working on 'something', you need to fix 'anotherthing'
#

# Make sure your current work is commited (aka saved)
$ git add .; git commit -m 'cleaning up something branch'

# Go back to develop and create a new feature 'anotherthing' to begin working on it. This leaves your 'something' work  untouched and not merged with anything
$ git checkout develop
$ git flow feature start anotherthing
### ...work, add, commit, repeat...finish work

# Finish working on feature 'anotherthing', merge it into "develop" (Your local develop)
$ git flow feature finish anotherthing

# Merge in develop branch that has been updated on repo (beanstalk)
$ git pull origin develop;
### ...fix any conflicts..

# Push your develop, now including changes from 'anotherthing' to develop for others to pull
$ git push origin develop;

#Go back to 'something' branch and continue working on that.
$ git checkout feature/something

#
# Scenario: After much interruption on other things, you finally finish work on 'something'
#
$ git add .; git commit -m 'finished something';
$ git flow feature finish something;
$ git pull origin develop;
###...fix any conflicts...
$ git push origin develop;

### Start a new feature branch for 'thenextbigthing'
$ git flow feature start thenextbigthing