Feature branch workflow

To merge changes from a local branch to a feature branch, follow this workflow.

  1. Clone the project if you haven’t already:

    git clone git@example.com:project-name.git
  2. Change directories so you are in the project directory.
  3. Create a branch for your feature:

    git checkout -b feature_name
  4. Write code for the feature.
  5. Add the code to the staging area and add a commit message for your changes:

    git commit -am "My feature is ready"
  6. Push your branch to GitLab:

    git push origin feature_name
  7. Review your code: On the left sidebar, go to Code > Commits.
  8. Create a merge request.
  9. Your team lead reviews the code and merges it to the main branch.