Skip to content

Commit fd7ae38

Browse files
committed
Add commit, squash section and other misc additions
Signed-off-by: Ayush P Gupta <[email protected]>
1 parent fc6ae49 commit fd7ae38

File tree

4 files changed

+25
-9
lines changed

4 files changed

+25
-9
lines changed

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ develop-team-A
133133

134134
### Scenario-3 : Start of sprint BB
135135

136-
We know the above release process may take a little time and meanwhile the next sprint can start. Hence in order to start the new sprint work, again the team lead will take out a new branch from develop:
136+
We know the above release process may take a little time and meanwhile the next sprint can start. Hence in order to start the new sprint work, again the team lead will take out a new branch from develop and thereafter team members can start working with their respective branches:
137137

138138
```
139-
develop
139+
develop-team-A
140140
141-
-- dev/team-A/sprint-BB
142-
-- dev/team-B/sprint-BB
141+
-- sprint-BB/team-A/bug/fix-null-in-report
142+
-- sprint-BB/team-A/feature/beat-o-meter
143143
```
144144

145145
And the process will continue, without hampering the previous sprint branches anywhere.
@@ -172,19 +172,23 @@ Pull request can be merged by admins in three ways (actually there are four, but
172172

173173
**no-ff merge** is used while merging hotfix branches so as to preserve merge history.
174174

175-
**Rebase and merge** is the most general way to merge PR into develop branches. This preserves linear history and prevents any merge commits while accepting PRs.
175+
**Rebase and merge** is the another general way to merge PR into develop branches. This preserves linear history and prevents any merge commits while accepting PRs.
176+
177+
Hence we recommend to use **Rebase and merge** option when merging PR of individual members into their respective team develop branch.
176178

177-
Hence all team members will use **Rebase and merge** option when merging PR of individual members into their respective team develop branch.
179+
**Note:** There is another way known as **Squash and merge** which is a little advanced concept but highly recommended way to have a meaningful commit history. Squash is helpful to merge less meaningful commits into one. Generally used when merging a feature, bug pull request. Again, if you know what you are doing, this is the **best option** to go with.
178180

179-
![](img/007.png)
181+
![](img/007.png)
182+
183+
![](img/016.png)
180184

181185
## BEST PRACTICES
182186

183187
### Branch Naming
184188

185189
Proper branch naming conventions must be used for development related work in team.
186190

187-
**[sprint-name] - [team name] - [work type] - [exact context]**
191+
**[sprint name] - [team name] - [work type] - [exact context]**
188192

189193
For example:
190194

@@ -235,7 +239,7 @@ Every merge to either **develop** or **master** must have the latest commit as *
235239
- [TourPlan] Don't show reason if empty.**
236240
```
237241

238-
3. Even the hotfix branch must include Release Commit and update the CHANGELOG.md in it accordingly.
242+
**3.** Even the hotfix branch must include Release Commit and update the CHANGELOG.md in it accordingly.
239243
```
240244
## [125.2.5] (Hotfix) 19/12/20
241245
@@ -275,6 +279,18 @@ Sometimes code related or code review type discussions are needed with other mem
275279

276280
![](img/015.png)
277281

282+
## CONCLUSION
283+
284+
If we follow above git practices wisely we then would have clean, understandable, meaningful, manageable git history.
285+
286+
### Before
287+
288+
![](img/017.png)
289+
290+
### After
291+
292+
![](img/018.png)
293+
278294
## FURTHER READING
279295

280296
1. <https://nvie.com/posts/a-successful-git-branching-model/>

img/016.png

65.6 KB
Loading

img/017.png

203 KB
Loading

img/018.png

248 KB
Loading

0 commit comments

Comments
 (0)