Skip to content

Commit

Permalink
Merge branch 'feature/feature_example' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eadz committed Sep 2, 2010
2 parents 7acacd0 + 5b99b47 commit f9687c1
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions README.markdown
Expand Up @@ -51,3 +51,59 @@ Even though this post isn't production ready, I'm going to make a release branch
When creating a release branch, it uses the current state of 'develop' branch as its base. You can make any further small commits to make it production ready, then you can run `git flow release finish 'v0.1'` to finish the release.

When the release is finished, the release branch will be merged to master.


## Git flow feature example ##

### Release branches ###
**May branch off from:** develop
**Must merge back into:** develop and master
**Branch naming convention:** release-*

### Feature branches ###
**May branch off from:** develop
**Must merge back into:** develop
**Branch naming convention:** feature/feature_name

Feature branches are where you'll do most of your work. This chapter is a feature branch. You make your changes, and commit to the branch, and when the branch is ready, it will be merged back into develop.

➜ Git-Flow-Example git:(feature/feature_example) ✗ git flow feature help
Branches 'develop' and 'origin/develop' have diverged.
And local branch 'develop' is ahead of 'origin/develop'.
Switched to a new branch 'feature/feature_example'

Summary of actions:
- A new branch 'feature/feature_example' was created, based on 'develop'
- You are now on branch 'feature/feature_example'

Now, start committing on your feature. When done, use:

git flow feature finish feature_example

There are quite a few options for git flow feature. You can find them buy running `git flow feature help`:

git flow feature help
usage: git flow feature [list] [-v]
git flow feature start [-F] <name> [<base>]
git flow feature finish [-rF] <name|nameprefix>
git flow feature publish <name>
git flow feature track <name>
git flow feature diff [<name|nameprefix>]
git flow feature rebase [-i] [<name|nameprefix>]
git flow feature checkout [<name|nameprefix>]
git flow feature pull <remote> [<name>]

If we push a feature branch to GitHub without releasing it(`git push origin feature/feature_example`), the network graph looks like this:

![network-newfeature](http://github.com/eadz/Git-Flow-Example/raw/develop/images/network-newfeature.png "After pushing feature branch")

Once we release the feature by running `git flow feature finish feature_example`, the changes on the feature branch are merged back into the **develop** branch, but not the master branch.




Once that happens, the network looks like this:


You can see the green dots are the individual commits on this branch.

Binary file added images/network-newfeature.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f9687c1

Please sign in to comment.