Created
October 10, 2012 15:54
-
-
Save fideloper/3866504 to your computer and use it in GitHub Desktop.
Gitflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment