]> rtime.felk.cvut.cz Git - hubacji1/oneflow.git/blob - oneflow.md
Add coffe
[hubacji1/oneflow.git] / oneflow.md
1 # OneFlow - a Git branching model and workflow
2 See the original post [1][] for details.
3
4 # Main branch
5 - Only long-live branch.
6 - Let's call it `master`.
7
8 # Feature branch
9 - New features and bugfixes for upcoming release.
10 - Cooperation, can be push forced.
11
12 ## Checkout from `master`
13 ```
14 $ git checkout -b feature/my-feature master
15 ```
16
17 ## Merge to `master`
18 ```
19 $ git checkout feature/my-feature
20 $ git rebase -i master
21 $ git checkout master
22 $ git merge --no-ff feature/my-feature
23 $ git push origin master
24 $ git branch -d feature/my-feature
25 ```
26
27 # Release branch
28 - Prepare project to be released.
29
30 ## Start from right commit on `master`
31 ```
32 git checkout -b release/2.3.0 9efc5d
33 ```
34
35 ## Merge to `master`
36 ```
37 $ git checkout release/2.3.0
38 $ git tag 2.3.0
39 $ git checkout master
40 $ git merge --no-ff release/2.3.0
41 $ git push --tags origin master
42 $ git branch -d release/2.3.0
43 ```
44
45 # Hotfix branch
46 - For critical defect solutions.
47
48 ## Start from last version tag
49 ```
50 $ git checkout -b hotfix/2.3.1 2.3.0
51 ```
52
53 ## Merge to `master`
54 ```
55 $ git checkout hotfix/2.3.1
56 $ git tag 2.3.1
57 $ git checkout master
58 $ git merge --no-ff hotfix/2.3.1
59 $ git push --tags origin master
60 $ git branch -d hotfix/2.3.1
61 ```
62
63 [1]: http://endoflineblog.com/oneflow-a-git-branching-model-and-workflow