Skip to main content

Synchronizing Feature and Source Branches

Working with branches is a good practice to avoid working directly with the main or any other source branch. A feature branch isolates your work from the source branch and is supposed to be short-lived. However, while working on a feature branch, often you need to get the latest changes from the source to this feature branch.

There is more than one way to refresh your feature branch with the latest changes, but it all depends on the tools you use. Here's a typical process:

  1. Check out the source branch (git checkout).
  2. Update the local source branch with the latest changes from the remote branch (git pull).
  3. Check out your feature branch (git checkout).
  4. To update your feature branch with the latest changes you just fetched, either:
    1. Merge the changes from the source branch into your branch (git merge).
    2. Rebase the source branch into your branch (git rebase).

Once both branches are updated and the feature branch changes are also ready, you can create a merge request to merge your feature branch into the remote source branch.

You may still get merge conflicts during the process, there you need to resolve the conflicts manually and decide which changes to keep and which changes to remove. For more information, see Resolving Merge Conflicts in DataOps.

For known limitations when you work in the web interface, see Resolving Merge Conflicts in Merge Requests.