Game Programming 03 - Git Flow
-
Upload
nick-pruehs -
Category
Technology
-
view
265 -
download
1
description
Transcript of Game Programming 03 - Git Flow
![Page 1: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/1.jpg)
Game ProgrammingGit Flow
Nick Prühs
![Page 2: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/2.jpg)
Objectives
• To understand how to develop separate features without interfering with other team members
• To get an idea of how to prepare a new release using a dedicated branch
• To learn how to integrate hotfixes in live environments
2 / 17
![Page 3: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/3.jpg)
GitFlow
• Originally developed by Vincent Driessen
• Assigns very specific roles to different branches, and defines how and when they should interact
• Allows merging and branching to be part of your daily workflow
3 / 17
![Page 4: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/4.jpg)
Main Branches
• master• origin/master HEAD is always ready for production
• develop• origin/develop HEAD always contains the latest
delivered development changes
• Nightly builds are created from this branch
• Whenever considered stable, merged back into masterand tagged
4 / 17
![Page 5: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/5.jpg)
Main Branches
5 / 17
![Page 6: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/6.jpg)
Supporting branches
• Feature branches• Allow parallel development
• Make tracking features easier
• Release branches• Help preparing for releases
• Hotfix branches• Enable you to quickly fix live problems
6 / 17
![Page 7: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/7.jpg)
Feature Branches
• Branch from and merge back into develop
• Used for developing new features
• Exists while the feature is in development
• Will eventually be• Merged back, to include the new feature in the next
release, or
• Discarded, if the feature should not be included
• Never directly interact with the master branch
7 / 17
![Page 8: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/8.jpg)
Feature Branches
8 / 17
![Page 9: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/9.jpg)
Hint
Merging with the “no fast-forward”option causes the merge to alwayscreate a new commit. This makestracking of your branches a loteasier!
9 / 17
![Page 10: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/10.jpg)
Release Branches
• Branch from develop, and merge back into develop and master
• Created when all desired features for the next release have been merged back into develop
• Supports preparation of a new production release• Setting up meta-data such as version numbers or
database connections
• Generating API documentation
• Features for the next release can already merge back into develop
10 / 17
![Page 11: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/11.jpg)
Release Branches
11 / 17
![Page 12: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/12.jpg)
Hint
Whenever changes are mergedback into master, this is a newproduction release by definition!
12 / 17
![Page 13: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/13.jpg)
Hotfix Branches
• Branch from master, and merge back into develop and master
• Created when a critical bug in a production release has to be resolved immediately
• Other team members can continue working on new features or the next release
13 / 17
![Page 14: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/14.jpg)
Hotfix Branches
14 / 17
![Page 15: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/15.jpg)
Hint
Unlike the two main branches, allsupporting branches will be mergedand removed eventually!
15 / 17
![Page 16: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/16.jpg)
References
• Vincent Driessen. A successful Git branchin model. http://nvie.com/posts/a-successful-git-branching-model/, January 5, 2010.
• Atlassian. Gitflow Workflow. https://www.atlassian.com/git/workflows#!workflow-gitflow, June 2014.
16 / 17
![Page 17: Game Programming 03 - Git Flow](https://reader034.fdocuments.in/reader034/viewer/2022052322/557c22c5d8b42a65268b4fdf/html5/thumbnails/17.jpg)
Thank you for your attention!
Contact
Blog
http://www.npruehs.de
@npruehs
Github
https://github.com/npruehs
17 / 17