Tool Development A - Git
-
Upload
nick-pruehs -
Category
Technology
-
view
114 -
download
1
Transcript of Tool Development A - Git
Objectives
• To get an overview of version control systems in general
• To learn how to use Git in a production environment
• To understand advanced concepts of branching and merging
2 / 58
DEMO
• Installing Git
• Installing SourceTree
• Creating a GitHub account
• Creating a Git repository
• Cloning the repository
10 / 58
DEMO
• Check file status
• Adding new files
• Viewing changes
• Staging modified files
• Moving files
• Removing files
11 / 58
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
31 / 58
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
32 / 58
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
34 / 58
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
35 / 58
Hint
Merging with the “no fast-forward”option causes the merge to alwayscreate a new commit. This makestracking of your branches a loteasier!
37 / 78
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
38 / 58
Hint
Whenever changes are mergedback into master, this is a newproduction release by definition!
40 / 78
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
41 / 58
Hint
Unlike the two main branches, allsupporting branches will be mergedand removed eventually!
43 / 78
References
• Chacon, Straub. Pro Git. 2nd Edition. Apress, December 24, 2014. http://www.git-scm.com/doc
• 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.
44 / 58
Thank you for your attention!
Contact
Blog
http://www.npruehs.de
@npruehs
Github
https://github.com/npruehs
45 / 58