Skip to content

Commit f6dd2d2

Browse files
committed
Merge branch 'release/v0.2'
2 parents d676b4a + 62426bf commit f6dd2d2

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

README.markdown

+66
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,69 @@ Even though this post isn't production ready, I'm going to make a release branch
5151
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.
5252

5353
When the release is finished, the release branch will be merged to master.
54+
55+
56+
## Git flow feature example ##
57+
58+
### Release branches ###
59+
**May branch off from:** develop
60+
**Must merge back into:** develop and master
61+
**Branch naming convention:** release-*
62+
63+
### Feature branches ###
64+
**May branch off from:** develop
65+
**Must merge back into:** develop
66+
**Branch naming convention:** feature/feature_name
67+
68+
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.
69+
70+
➜ Git-Flow-Example git:(feature/feature_example) ✗ git flow feature help
71+
Branches 'develop' and 'origin/develop' have diverged.
72+
And local branch 'develop' is ahead of 'origin/develop'.
73+
Switched to a new branch 'feature/feature_example'
74+
75+
Summary of actions:
76+
- A new branch 'feature/feature_example' was created, based on 'develop'
77+
- You are now on branch 'feature/feature_example'
78+
79+
Now, start committing on your feature. When done, use:
80+
81+
git flow feature finish feature_example
82+
83+
There are quite a few options for git flow feature. You can find them buy running `git flow feature help`:
84+
85+
git flow feature help
86+
usage: git flow feature [list] [-v]
87+
git flow feature start [-F] <name> [<base>]
88+
git flow feature finish [-rF] <name|nameprefix>
89+
git flow feature publish <name>
90+
git flow feature track <name>
91+
git flow feature diff [<name|nameprefix>]
92+
git flow feature rebase [-i] [<name|nameprefix>]
93+
git flow feature checkout [<name|nameprefix>]
94+
git flow feature pull <remote> [<name>]
95+
96+
If we push a feature branch to GitHub without releasing it(`git push origin feature/feature_example`), the network graph looks like this:
97+
98+
![network-newfeature](http://github.com/eadz/Git-Flow-Example/raw/develop/images/network-newfeature.png "After pushing feature branch")
99+
100+
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.
101+
102+
➜ Git-Flow-Example git:(feature/feature_example) git flow feature finish feature_example
103+
Switched to branch 'develop'
104+
Merge made by recursive.
105+
README.markdown | 56 +++++++++++++++++++++++++++++++++++++++++
106+
images/network-newfeature.png | Bin 0 -> 14738 bytes
107+
2 files changed, 56 insertions(+), 0 deletions(-)
108+
create mode 100644 images/network-newfeature.png
109+
Deleted branch feature/feature_example (was 5b99b47).
110+
111+
Summary of actions:
112+
- The feature branch 'feature/feature_example' was merged into 'develop'
113+
- Feature branch 'feature/feature_example' has been removed
114+
- You are now on branch 'develop'
115+
116+
Once the develop branch is pushed to GitHub, network graph looks like this:
117+
118+
![network-after-feature-merge](http://github.com/eadz/Git-Flow-Example/raw/develop/images/network-after-feature-merge.png "After pushing merging")
119+
14.9 KB
Loading

images/network-newfeature.png

14.4 KB
Loading

0 commit comments

Comments
 (0)