Gitlab Master FAQ: Difference between revisions

From pCT
(Created page with "Main Page -> Documentation -> Gitlab Master FAQ This is a collection of frequently asked Gitlab questions for project maintainers Please '''edit''' this page and...")
 
No edit summary
Line 4: Line 4:


Please '''edit''' this page and '''add''' your question, or send email to pCT@uib.no
Please '''edit''' this page and '''add''' your question, or send email to pCT@uib.no
=== Importing an external package ===
The project will use a couple of external packages which are hosted in a different master repository. Copies of such external packages can be added to the gitlab server under our project group to provide a consistent package.
Here is a proposed workflow for importing a package which is already hosted in git.
# Create new repository in the pCT group or ask for creation, lets call it ''newPackage''
# Fork the repository to your user space
# Clone the package you want to import
#:<pre> git clone <some_external_link> newPackage # we give it the new name</pre>
#:<pre> cd newPackage</pre>
# Redirect upstream URL to the fork in your gitlab user space
#:<pre> git remote set-url origin https://user@gitlab.uib.no/user/newPackage.git</pre>
# Now make a forced push (option ''-f'') to import the repository to your fork
#:<pre> git push -f origin</pre>
# Create merge request to branch ''import'' (if not existing, ''master'' or any other appropriate branch) by following the instructions [[Documentation#Pull/Merge request | Pull/Merge request]]

Revision as of 10:24, 10 February 2021

Main Page -> Documentation -> Gitlab Master FAQ

This is a collection of frequently asked Gitlab questions for project maintainers

Please edit this page and add your question, or send email to pCT@uib.no

Importing an external package

The project will use a couple of external packages which are hosted in a different master repository. Copies of such external packages can be added to the gitlab server under our project group to provide a consistent package.

Here is a proposed workflow for importing a package which is already hosted in git.

  1. Create new repository in the pCT group or ask for creation, lets call it newPackage
  2. Fork the repository to your user space
  3. Clone the package you want to import
     git clone <some_external_link> newPackage # we give it the new name
     cd newPackage
  4. Redirect upstream URL to the fork in your gitlab user space
     git remote set-url origin https://user@gitlab.uib.no/user/newPackage.git
  5. Now make a forced push (option -f) to import the repository to your fork
     git push -f origin
  6. Create merge request to branch import (if not existing, master or any other appropriate branch) by following the instructions Pull/Merge request