Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Gitlab Fork Workflow

  1. Fork the project
    1. After logging in, click on the "Fork" link at the top right of the project page.
      Image Added
    2. Specify the Project name, Group (or user account) the project should be under, and the name for the fork as Project slug. Set the Visibility level to Public, and click "Fork project"
      Image Added
  2. Setup mirroring - This will keep the project's default branch up-to-date in your fork so you can always start your work from the most recent changes to the project.
    Alternatively you may manage this yourself by adding an extra 'upstream'
    remote git remote pointed at the original project, and routinely running 'git pull upstream/master','git push origin master' to update your fork.
    1. Open Settings → Repository from the project sidebar.
      Image Added
    2. Expand the "Mirroring repositories" section
      Image Added
    3. Enter the Git Repository URL starting with https://gitlab.com/anuket and ending with /<project>.git
      Image Added
    4. Check "Mirror only
      Image Added

  3. Clone your fork
    There is a "Clone" drop down on the fork project page which provides git URLs to clone over SSH or HTTPS (to be passed to git clone) or magic links to clone the project through Visual Studio Code.
    Image Added
  4. Checkout a new branch to make your change
    git checkout -b <mybranchname>
  5. Edit the code, stage the changes (edit, git add), and commit
    Write you change (remember to include `-s` to sign off commits: `git
    commit -s`)
  6. git push
  7. them to your branch
    Remember to include a 'Signed-off-by' line on your commits ( git commit -s if on the command line).
    Image Added
  8. Push the branch to your fork
    git push
  9. There will be a link returned in the console from running git push, which when clicked will automatically Click the link from the message to open a merge request to the
    upstream repositoryproject.
    Make sure the source branch comes from your fork and the target is the upstream repository
  10. If you have multiple commits, write a detailed explanation about what you're asking to be merged in.
    Set the change to "Draft" if its still being worked on.
  11. Wait for CI to pass and a CODEOWNER to review.
    If the project is utilizing hardware for their CI, a developer will need to approve your pipeline to run before it is tested.

...