Git and GitHub - adrielFab/Kaasch GitHub Wiki
Git branching is done in a specific way. There are 2 fundamental branches that are part of the project that will never be deleted:
- Master
- dev
For this project, we are only focusing on dev since we are only doing 1 release. When focusing on a specific task, another branch needs to be created from dev. There are 4 reasons to create a new branch from dev:
- Feature Branch (Epic)
- User Interface Task
- Code Refactoring Task
First sync local with remove branches
git fetch
Change branch
git checkout dev
//you are now in dev
git pull origin dev
//you are updating dev
Creating a new branch from dev
git checkout -b Name_of_Branch dev
Name_of_Branch
- Feature (JIRA epic id)
git checkout -b IK-## dev
- Code Refactor Task (include the author name)
git checkout -b Refactor_IK-### dev //ID of task
To avoid merge conflicts, if 2 or more people are working on the same epic, this includes user interface or code refactor, each developer must each create their own branch.
Pull Requests
Pull request take 2 parameters : base and compare
- base: this is the branch that will accept the changes
- compare: this is the branch that will provide the changes