Git - KeithWilliamsGMIT/4th-Year-Mobile-Application-Development-Project GitHub Wiki
Overview
Git can be used in a number of ways to help manage the development of a software development project. This investigation will try to determine how Git, and GitHub, can be best utilised in this project.
Workflow
A workflow describes the steps in a process, in this case the process of tracking work with Git. The two main workflows for Git are GitFlow and GitHub Flow. Both workflows simply describe different methods of working with branches in Git. GitFlow is the more complex of the two, featuring far more branches. In return however, it offers great scalability and flexibility. GitHub Flow is a much more simple workflow which uses only two types of branches. The first is the master branch, which always contains deployable code. However, no changes should be committed directly into the master branch. Instead a new branch should be created for each new feature, or fix, and then merged with master when ready to deploy.
This project is an individual project with a reasonably short time frame. Using a complex workflow such as GitFlow may be more of a hindrance in this case as it'll take more time to set up but the scalability it offers would be redundant. Therefore, for this project I will use GitHub Flow.
Merging
To merge a two branches in GitHub you must create a pull request. After specifying the feature branch and the base branch, the changes between the two will be displayed for review. GitHub provides three methods for merging branches.
- Merge pull request (Default)
All commits from the feature branch are added to the base branch in a merge commit. - Squash and merge
All commits on the feature branch are squashed, or combined, into one commit and merged into the base branch. - Rebase and merge
All commits from the feature branch are added onto the base branch individually without a merge commit.
Although the squash and merge method might offer a more streamlined Git history, one objective of this project is to develop it in an iterative and incremental manner. Using the default merge pull request method might make this easier to measure and determine whether or not the objective was met at the end of the project.