Once you finish working on a feature branch, you typically merge it with a develop branch. You can accomplish this using the git merge or git rebase commands, with different results:
- Merge method: Retains all changes to and history of the merged branch. The revision history can become complicated after many merges.
- Rebase method: Maintains a clean revision history since merged commits are appended at the end of the target branch. Conflicts may occur more often than with the merge method.
You and your team should decide which method of merging you prefer.
To keep your revision history simple, you can rebase the feature branch onto the develop branch before merging it into the develop branch. This results in a fast-forward merge without creating extra merge commits.