-
Notifications
You must be signed in to change notification settings - Fork 23
GIT development workflow
#Description This page will describe how we are working with development of new features, releases, bug fixing and also some git tips and trix.
No development work are made in master, we will merge the develop branch into master when it's time to do a new release.
This branch is based on a main release tag in master (like 5.3) when we need to fix bugs for a specific release. New bug fixing releases will be tagged in this branch with X.Y.Z. We will not merge a bugfix release back into master. (TBD - How should we get bugfixes back into dev?)
This is our main development branch where we receive pull-requests and are doing small improvements to the code base. When a feature branch is finished they will be merged into develop. When the development work are ready to be released the dev branch are merged into master.
When we are developing new features that should be done in a feature branch based on develop. When the feature are ready the branch will be merged into dev.
$ git checkout develop
$ git pull --rebase
$ git status # branch should be clean
$ git checkout -b feature/new-cool-feature
$ <add some commits with your feature
If you don't have pushed your feature branch to origin it is safe to rebase the feature branch from develop
$ git checkout feature/new-cool-feature
$ git rebase develop
Your new feature are finished and commited into your feature branch
$ git checkout develop
$ git merge --squash feature/new-cool-feature
$ git add .
$ git commit -m "Merged new-cool-feature"
$ git branch -D feature/new-cool-feature
$ git checkout develop
$ git pull --rebase
$ git status # branch should be clean
$ git checkout -b feature/new-cool-feature
$ <add some commits with your feature>
$ git push -u origin feature/new-cool-feature
$ git checkout feature/new-cool-feature
$ git merge develop
$ git push origin feature/new-cool-feature
Your new feature are finished and commited into your feature branch
$ git checkout develop
$ git merge --squash feature/new-cool-feature
$ git add .
$ git commit -m "Merged new-cool-feature"
$ git log --graph --all --decorate
$ git checkout develop
$ git merge master
(resolve any merge conflicts if there are any)
$ git push origin develop
$ git checkout master
$ git merge --no-ff develop (there won't be any conflicts now)
$ git push origin master