-1

Here is my issue : I am working on a python project with others developers. This project is on Gitlab but each developers need to work on their machine locally without any access to network. I would like other developers to be able to push their changes made locally to gitlab server. My PC is connected to the internet and I have access to gitlab repository.

First question, how developers could clone gitlab repository using the bare repository on the usb stick. Second question, how they can push their changes on the bare repository so that I could push them to Gitlab server ?

In order to do that I am thinking about using a bare repository on a usb stick.

  • https://stackoverflow.com/a/49101839/7976758 – phd May 11 '23 at 15:52
  • I don't understand the question. Developers can clone from the bare repo on the usb by using `git clone`. They can push to the repo by using `git push`. Are you asking about how to mount the drive on their machines? Or ??? – William Pursell May 11 '23 at 15:57

1 Answers1

0

If you plug in the USB stick, you can do git clone <path to repo on USB>. There is nothing special here. Every git repo can be cloned. This is how a distributed version control system works. We often use a centralized model using some hosting service, but this is just a convention and isn't enforced by git.

You can git push back to the USB at any time. Then you will need to plug the USB stick into a machine that has internet access. To push to Gitlab, just cd <path to repo on USB> and git push (assuming that the repo on the USB stick was cloned from Gitlab or otherwise has an origin remote.

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268