GitLab fork remote public repo

My organization has a dedicated computer for our GitLab installation. I regularly work with other community projects (Drupal.org and Github). I would like to have a repo on our GitLab with a branch that will track a remote Drupal or Github project, in addition to having its own development and production branches.

You want it to be on the GitLab server (machine), so the developer is not responsible for tracking and updating from the open console.

Essentially, fork public repo is tracked on "master", with internal branches of "devel" and "prod"; developers only clone an internal branch of development. Then you have the opportunity to pull from the remote into the master, and then merge into other internal branches at will. Could this be done via a web interface or with hooks? or...

After responding to Create a fork of the public git repository for github , it looks like it should be a script to pull from the open console to the local one, then click on the main GitLab, with the script installed as the cron job. Yes?

+9
git gitlab github
source share
2 answers

Fork is nothing more than a new repository with added remote

There are three main ideas that need to be understood:

  • each git repository is a standalone repository
  • "fork" is a buzzword for a repository with remote reference to the source repository
  • GitLab is nothing more than a user interface for real Git storage on the file system.

Therefore, if you insist that some branches should be updated on your server with remote branches (git: // or http (s): //), you can add a new remote to your real git repository (usually located in / home / git / repositories, check your gitlab.yml) and configure cron to receive changes from such a remote.

BUT , many things can go wrong if the pull is not fast-forward, and merging is required.

The solution to this problem is to select the remote control and restart it, but this time all your changes will be lost.

Better do it all by hand

If possible, a much better solution would be to devote some time and pull the changes manually, check them for consistency, and send them to a local copy.

0
source share
0
source share

All Articles