Project

General

Profile

Repository » History » Version 35

Simó Albert i Beltran, 03/07/2013 03:30 PM
Reserve current workflow for the future.

1 1 Pau Escrich
h1. Repository
2 1 Pau Escrich
3 35 Simó Albert i Beltran
At the moment we work with a main branch, the master branch.
4 35 Simó Albert i Beltran
5 35 Simó Albert i Beltran
6 35 Simó Albert i Beltran
h1. Possible future workflow:
7 35 Simó Albert i Beltran
8 1 Pau Escrich
h2. Structure
9 1 Pau Escrich
10 1 Pau Escrich
The qMp git repository is split in three branches:
11 1 Pau Escrich
12 1 Pau Escrich
# Master
13 1 Pau Escrich
# Testing
14 23 Simó Albert i Beltran
# Other: Features/Bugfixes
15 1 Pau Escrich
16 1 Pau Escrich
h3. Master
17 1 Pau Escrich
18 1 Pau Escrich
This is the main branch and all changes committed here must be tested in Testing branch before.
19 1 Pau Escrich
20 6 Simó Albert i Beltran
However the small bugfixes can be directly applied here. These changes must be merged in the testing branch.
21 1 Pau Escrich
22 10 Simó Albert i Beltran
<pre>
23 10 Simó Albert i Beltran
o---o---o---o---o master
24 10 Simó Albert i Beltran
                 \  
25 10 Simó Albert i Beltran
--o---o---o---o---o testing 
26 10 Simó Albert i Beltran
</pre>
27 10 Simó Albert i Beltran
28 22 Simó Albert i Beltran
*Example:*
29 30 Anonymous
<pre><code class="shell">
30 32 Simó Albert i Beltran
git checkout origin/testing
31 32 Simó Albert i Beltran
git merge origin/master
32 29 Simó Albert i Beltran
</code></pre>
33 22 Simó Albert i Beltran
34 22 Simó Albert i Beltran
35 1 Pau Escrich
h3. Testing
36 1 Pau Escrich
37 8 Simó Albert i Beltran
This is the branch for test new features and changes. The features must be already working features tested before in a specific branch by at least the developer. A feature can be committed here only when it is finished, but not in a middle state.
38 1 Pau Escrich
39 15 Simó Albert i Beltran
When the testing branch are deeply tested by more than one developer, than it can be merged on the master branch.
40 11 Simó Albert i Beltran
41 11 Simó Albert i Beltran
<pre>
42 11 Simó Albert i Beltran
o---o---o---o---o master
43 11 Simó Albert i Beltran
     \         /  
44 11 Simó Albert i Beltran
--o---o---o---o testing 
45 11 Simó Albert i Beltran
</pre>
46 11 Simó Albert i Beltran
47 16 Pau Escrich
*Example:*
48 11 Simó Albert i Beltran
49 16 Pau Escrich
Import master bugfixes to testing
50 30 Anonymous
<pre><code class="shell">
51 32 Simó Albert i Beltran
git checkout origin/testing
52 32 Simó Albert i Beltran
git merge origin/master
53 29 Simó Albert i Beltran
</code></pre>
54 16 Pau Escrich
55 16 Pau Escrich
Merge testing changes in master
56 30 Anonymous
<pre><code class="shell">
57 32 Simó Albert i Beltran
git checkout origin/master
58 32 Simó Albert i Beltran
git merge origin/testing
59 29 Simó Albert i Beltran
</code></pre>
60 16 Pau Escrich
61 12 Simó Albert i Beltran
h3. Other: Features/Bugfixes
62 1 Pau Escrich
63 8 Simó Albert i Beltran
The rest of the branches are temporal branches.
64 8 Simó Albert i Beltran
65 26 Simó Albert i Beltran
h4. Features
66 26 Simó Albert i Beltran
67 34 Simó Albert i Beltran
If it is about a new feature the name of the branch must be the name of the feature (of some name which identifies it). These branches are considered non-functional, so a non-finished feature can be committed here. This branch should preferably be based on a commit of master branch. Once the feature is finish and tested by at least the developer, it should be merged to testing and other branches.
68 1 Pau Escrich
69 9 Simó Albert i Beltran
<pre>
70 9 Simó Albert i Beltran
o---o---o---o---o master
71 14 Simó Albert i Beltran
     \
72 9 Simó Albert i Beltran
      o---o---o issue#23-new-feature
73 14 Simó Albert i Beltran
               \
74 9 Simó Albert i Beltran
o---o---o---o---o testing 
75 9 Simó Albert i Beltran
</pre>
76 9 Simó Albert i Beltran
77 16 Pau Escrich
*Example:*
78 9 Simó Albert i Beltran
79 30 Anonymous
<pre><code class="shell">
80 24 Simó Albert i Beltran
git checkout -b issue#23-new-feature origin/master
81 24 Simó Albert i Beltran
editor dir/file
82 25 Simó Albert i Beltran
git add dir/file
83 24 Simó Albert i Beltran
git commit
84 24 Simó Albert i Beltran
#test issue#23-new-feature branch
85 32 Simó Albert i Beltran
git checkout origin/testing
86 24 Simó Albert i Beltran
git merge issue#23-new-feature
87 29 Simó Albert i Beltran
</code></pre>
88 24 Simó Albert i Beltran
89 27 Simó Albert i Beltran
h4. Bugfixes
90 24 Simó Albert i Beltran
91 33 Simó Albert i Beltran
A bugfix must be implemented in a new branch. This branch must be based on a commit of the master branch. This branch should not be based on a commit of the testing branch because it may contain new features and these maybe cannot be imported in the master branch. This new branch can be merged in testing and other branches.
92 7 Simó Albert i Beltran
93 7 Simó Albert i Beltran
<pre>
94 7 Simó Albert i Beltran
o---o---o---o---o master
95 1 Pau Escrich
     \         /
96 9 Simó Albert i Beltran
      o---o---o issue#23-bugfix
97 7 Simó Albert i Beltran
               \
98 7 Simó Albert i Beltran
o---o---o---o---o testing 
99 7 Simó Albert i Beltran
</pre>
100 16 Pau Escrich
101 16 Pau Escrich
*Example:*
102 1 Pau Escrich
103 30 Anonymous
<pre><code class="shell">
104 28 Simó Albert i Beltran
git checkout -b issue#23-bugfix origin/master
105 28 Simó Albert i Beltran
editor dir/file
106 28 Simó Albert i Beltran
git add dir/file
107 28 Simó Albert i Beltran
git commit
108 28 Simó Albert i Beltran
#test issue#23-bugfix branch
109 28 Simó Albert i Beltran
git checkout origin/testing
110 28 Simó Albert i Beltran
git merge issue#23-bugfix
111 28 Simó Albert i Beltran
git checkout origin/master
112 28 Simó Albert i Beltran
git merge issue#23-bugfix
113 29 Simó Albert i Beltran
</code></pre>
114 28 Simó Albert i Beltran
115 28 Simó Albert i Beltran
116 1 Pau Escrich
h2. How to use it
117 1 Pau Escrich
118 2 Pau Escrich
119 2 Pau Escrich
h2. Good practices