Project

General

Profile

Repository » History » Version 37

Simó Albert i Beltran, 03/07/2013 04:55 PM
Typo.

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 36 Simó Albert i Beltran
If you want solve a bug you could start a new branch based in a commit that introduces a bug or based in a head of master branch.
6 36 Simó Albert i Beltran
<pre>
7 36 Simó Albert i Beltran
     ----o issue#23
8 36 Simó Albert i Beltran
    /     \
9 36 Simó Albert i Beltran
o--o--o----o master
10 36 Simó Albert i Beltran
   ^
11 36 Simó Albert i Beltran
    commit with an error, it causes error described in issue 23.
12 37 Simó Albert i Beltran
</pre>
13 35 Simó Albert i Beltran
14 35 Simó Albert i Beltran
h1. Possible future workflow:
15 35 Simó Albert i Beltran
16 1 Pau Escrich
h2. Structure
17 1 Pau Escrich
18 1 Pau Escrich
The qMp git repository is split in three branches:
19 1 Pau Escrich
20 1 Pau Escrich
# Master
21 1 Pau Escrich
# Testing
22 23 Simó Albert i Beltran
# Other: Features/Bugfixes
23 1 Pau Escrich
24 1 Pau Escrich
h3. Master
25 1 Pau Escrich
26 1 Pau Escrich
This is the main branch and all changes committed here must be tested in Testing branch before.
27 1 Pau Escrich
28 6 Simó Albert i Beltran
However the small bugfixes can be directly applied here. These changes must be merged in the testing branch.
29 1 Pau Escrich
30 10 Simó Albert i Beltran
<pre>
31 10 Simó Albert i Beltran
o---o---o---o---o master
32 10 Simó Albert i Beltran
                 \  
33 10 Simó Albert i Beltran
--o---o---o---o---o testing 
34 10 Simó Albert i Beltran
</pre>
35 10 Simó Albert i Beltran
36 22 Simó Albert i Beltran
*Example:*
37 30 Anonymous
<pre><code class="shell">
38 32 Simó Albert i Beltran
git checkout origin/testing
39 32 Simó Albert i Beltran
git merge origin/master
40 29 Simó Albert i Beltran
</code></pre>
41 22 Simó Albert i Beltran
42 22 Simó Albert i Beltran
43 1 Pau Escrich
h3. Testing
44 1 Pau Escrich
45 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.
46 1 Pau Escrich
47 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.
48 11 Simó Albert i Beltran
49 11 Simó Albert i Beltran
<pre>
50 11 Simó Albert i Beltran
o---o---o---o---o master
51 11 Simó Albert i Beltran
     \         /  
52 11 Simó Albert i Beltran
--o---o---o---o testing 
53 11 Simó Albert i Beltran
</pre>
54 11 Simó Albert i Beltran
55 16 Pau Escrich
*Example:*
56 11 Simó Albert i Beltran
57 16 Pau Escrich
Import master bugfixes to testing
58 30 Anonymous
<pre><code class="shell">
59 32 Simó Albert i Beltran
git checkout origin/testing
60 32 Simó Albert i Beltran
git merge origin/master
61 29 Simó Albert i Beltran
</code></pre>
62 16 Pau Escrich
63 16 Pau Escrich
Merge testing changes in master
64 30 Anonymous
<pre><code class="shell">
65 32 Simó Albert i Beltran
git checkout origin/master
66 32 Simó Albert i Beltran
git merge origin/testing
67 29 Simó Albert i Beltran
</code></pre>
68 16 Pau Escrich
69 12 Simó Albert i Beltran
h3. Other: Features/Bugfixes
70 1 Pau Escrich
71 8 Simó Albert i Beltran
The rest of the branches are temporal branches.
72 8 Simó Albert i Beltran
73 26 Simó Albert i Beltran
h4. Features
74 26 Simó Albert i Beltran
75 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.
76 1 Pau Escrich
77 9 Simó Albert i Beltran
<pre>
78 9 Simó Albert i Beltran
o---o---o---o---o master
79 14 Simó Albert i Beltran
     \
80 9 Simó Albert i Beltran
      o---o---o issue#23-new-feature
81 14 Simó Albert i Beltran
               \
82 9 Simó Albert i Beltran
o---o---o---o---o testing 
83 9 Simó Albert i Beltran
</pre>
84 9 Simó Albert i Beltran
85 16 Pau Escrich
*Example:*
86 9 Simó Albert i Beltran
87 30 Anonymous
<pre><code class="shell">
88 24 Simó Albert i Beltran
git checkout -b issue#23-new-feature origin/master
89 24 Simó Albert i Beltran
editor dir/file
90 25 Simó Albert i Beltran
git add dir/file
91 24 Simó Albert i Beltran
git commit
92 24 Simó Albert i Beltran
#test issue#23-new-feature branch
93 32 Simó Albert i Beltran
git checkout origin/testing
94 24 Simó Albert i Beltran
git merge issue#23-new-feature
95 29 Simó Albert i Beltran
</code></pre>
96 24 Simó Albert i Beltran
97 27 Simó Albert i Beltran
h4. Bugfixes
98 24 Simó Albert i Beltran
99 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.
100 7 Simó Albert i Beltran
101 7 Simó Albert i Beltran
<pre>
102 7 Simó Albert i Beltran
o---o---o---o---o master
103 1 Pau Escrich
     \         /
104 9 Simó Albert i Beltran
      o---o---o issue#23-bugfix
105 7 Simó Albert i Beltran
               \
106 7 Simó Albert i Beltran
o---o---o---o---o testing 
107 7 Simó Albert i Beltran
</pre>
108 16 Pau Escrich
109 16 Pau Escrich
*Example:*
110 1 Pau Escrich
111 30 Anonymous
<pre><code class="shell">
112 28 Simó Albert i Beltran
git checkout -b issue#23-bugfix origin/master
113 28 Simó Albert i Beltran
editor dir/file
114 28 Simó Albert i Beltran
git add dir/file
115 28 Simó Albert i Beltran
git commit
116 28 Simó Albert i Beltran
#test issue#23-bugfix branch
117 28 Simó Albert i Beltran
git checkout origin/testing
118 28 Simó Albert i Beltran
git merge issue#23-bugfix
119 28 Simó Albert i Beltran
git checkout origin/master
120 28 Simó Albert i Beltran
git merge issue#23-bugfix
121 29 Simó Albert i Beltran
</code></pre>
122 28 Simó Albert i Beltran
123 28 Simó Albert i Beltran
124 1 Pau Escrich
h2. How to use it
125 1 Pau Escrich
126 2 Pau Escrich
127 2 Pau Escrich
h2. Good practices