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