Based on atlassian gitflow document The goal of the exercise is to learn the gitflow by practicing it.
Keywords for branch name prefixes are:
feature
for feature branchestask
for standalone tasks or parts of the featuretest
for experiments that are not intended to be merged intodevelop
version
for release branches and tagshotfix
for branches that urgently (out of the usuall iteration flow) change the content (code/app) that has already been built\released
example names:
task/[TaskID-1337]-human-understandable-task-name
version/1.1
- Fork this repo, invite participants to collaborate. From now on work in your repos. Prefer working in pairs.
- Feel free to update this README.md at any point with any info you consider useful and updating the task's description to be more clear. You will need this at the latest stage.
- "Develop" a feature
- Create a branch for the feature development from the
develop
. - Create a file feature2/contents.txt and write something there.
- Create a PR targeting the
develop
(mind the target repo. You want to target your repo, not the source of the fork). - Approve the PR and merge it via creating a merge commit.
- Make sure that the feature branch is deleted.
- Create a branch for the feature development from the
- "Release" the version
- Create a
version
branch fromdevelop
. - Update and commit the version number (
version.txt
file). - Tag the commit.
- Create a
- Do the post-release house-keeping
- Merge the release branch into
develop
. - Merge the latest release tag into
master
using fast-forward. Somaster
branch would point to the exact commit that has a tag.
- Merge the release branch into
- Improve feature2
- Create a branch from
develop
. - Set feature's text to "I love code". Don't merge it yet.
- Create a branch from
- Improve feature2 yet again
- Create a branch from
develop
. - Set it's file text to "I love git". Don't merge it yet
- Create a branch from
- Create and merge a PR for each feature2 improvement into
develop
.
Resolve the merge conflict. Two changes should be present indevelop
in one sentence. The sentence should be grammatically and punctuationally correct. (This will require manual conflict resolution) - "Release" the version. (See part B-2 for the details)
- Do the post-release house-keeping. (See part B-3 for the details)
- Decide that you want a hotfix
- Create a
hotfix
branch frommaster
. (Mind that you want that branch name to contain the upcoming hotfix version number)
- Create a
- Make changes
-
Create a
task
branch fromhotfix
. -
Swap the code and git words in feature2 (ex: If it was "I love code and git" it should become "I love git and code")
-
PR
task
intohotfix
-
- "Release" the version
version
branch creation is not needed here sice we have ahotfix
one- Update and commit the version number (version.txt file).
- Tag the commit.
- Do the post-release house-keeping
- Create a PR to the original (not forked) repo with changed README.md that holds your updates and clarifications.