-
Notifications
You must be signed in to change notification settings - Fork 10
Workflow
The general workflow follows the three branch principle. It is designed to limit the number of rebases and merge conflicts that will inevitably arise working in a bigger team. There are three kindes of branches in this workflow
-
master branch
No acutal work is done on the master branch. That means no pushing an doing work directly on the master branch. In regular intervals a working development branch will be merged to the master branch so there is always a stable version on the master branch for deployment to users. It is only for releases.
-
development branch
There will be (almost) no direct work on the development branch. It holds the latest stable version of the application. Only changes that won't break the build should be merged into the development branch. Merges should follow the 4-eye principle. Code will be accepted to the development branch after a simple code review done during a merge request. A continous delivery tool will automatically build and test the app and deploy it to some
-
feature branches
Feature branches will be where most of the work will be done. For every feature or change to be developed a new feature branch, based on the latest development branch will be created. All work and changes will be done on these branches. As soon as a feature it will be pushed to the remote repository. To merge the changes to the development branch a merge request should be created via the github-ui.
-
Clone repository
git clone git@github.com:jcvasquezc/SMA2.git -
Switch to the development branch
git checkout development -
Create a feature branch
git branch feature/[some resonably explanatory name] -
Switch to feature branch
git checkout feature/myfeature -
Commit changes and push changes to remote feature branch
5.1 Add changes to commit
Add all changes (including hidden files):
git add .Add all changes (excluding hidden files):
git add *Selectively add changes
git add filename1 filename25.2 Commit
Remember, changes should be atomic, so you can retrace what you have done
git commmit -m "description of what you have done" -
Push to remote
The first time you do this there will probablye be no remote branch yet, so you need to set the upstream branch first. Just use the push command for this and the cli will tell you what command to use to create the remote.
git pushExample output if branch does not exist on remote, just copy and paste the code.
- Pull request(merge request)
Go to the github repository with your browser and navigate to your feature branch. Click on create new pull request next to your feature branch. Make sure to create the pull request to the correct base branch(should be development) and leave an explanatory comment.
- Review and accept merge In the github repo page navigate to Pull requests. If you see there is an open pull request click on it to review.
- Merge pull request After reviewing it and checking everything is ok, click on merge pull request. Confirm it and after successfully merging and closing it you can savely delete the branch.