Commit b34e95c6 authored by Emmanuel Promayon's avatar Emmanuel Promayon

NEW add doc to solve conflict with develop

parent 5dffe143
......@@ -140,7 +140,7 @@ git push
Follow up the discussion on the merge request to complete the actions required by the CamiTK team.
!!! Warning
**Do not forget to delete the local *feature/\#42* after the merge is accepted (see below)**
**Do not forget to delete the local *feature/new-feature* after the merge is accepted (see below)**
### Delete a branch after the merge-request was accepted
......@@ -159,7 +159,7 @@ To delete all local branch that has been merged on origin:
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
```
### Work on a feature branch
### Working on a feature branch
To version your code, do not hesitate to commit to your branch as often as possible (and to push it so that your changes can appear in the merge request for review or sharing).
When you push, the gitlab-ci system is automatically started unless you add `[ci skip]` or `[skip ci]` to the commit message.
......@@ -199,6 +199,39 @@ When you push, the gitlab-ci system is automatically started unless you add `[ci
git push
```
#### Updating a feature branch that have conflicts with current develop
Sometimes your feature branch will be to distant to `develop`. In this case, gitlab will complain and say that you can not merge
your feature branch in `develop`.
In this case **DON'T FOLLOW** the instructions given by gitlab. It is better to do the following steps :
```bash
# First update your local develop branch
git checkout develop
# Get the current remote version
git fetch -p origin
# Merge the changes from `origin/develop` into your local `develop` branch. Your local `develop` branch will then be in sync with the remote repository
git merge origin/develop
# Check out your feature branch
git checkout feature/new-feature
# Merge the updated `develop` into your feature branch to include the latest changes
git merge develop
```
Now you can solve the conflicts. Note for Linux user, we recommand using a GUI merge tool to help to solve the conflicts, for instance
`git mergetool --tool=kdiff3`
This only updates the local feature branch. Then, you need to:
- check all the files (some automatic merges might *not be what you want*)
- if needed, add and commit your changes (e.g. `git add .; git commit -m "Solved merge conflicts"`)
Push you branch to remote:
```
git push origin feature/new-feature
```
Gitlab should start the CI pipeline and remove the merge conflict warnings.
## Release
### Create a specific release branch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment