Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save decagondev/65fcd37dbb32cb02efa0f93cc9b92168 to your computer and use it in GitHub Desktop.

Select an option

Save decagondev/65fcd37dbb32cb02efa0f93cc9b92168 to your computer and use it in GitHub Desktop.

This is a smart way to keep your storage lean. By using a depth of 1, you only push the "current snapshot" of OpenEMR to your GitLab, avoiding the gigabytes of historical data and thousands of older commits. Here is the step-by-step workflow:

1. Create the Destination Repo on GitLab

  1. Log in to labs.gauntletai.com.
  2. Click New Project > Create blank project.
  3. Name it openemr (or your preferred name).
  4. Important: Uncheck "Initialize repository with a README" so the repo starts completely empty.
  5. Copy the Clone URL (SSH or HTTPS).

2. Shallow Clone OpenEMR from GitHub

On your local machine (or the server where you are working), run:

Clone only the latest state of the master branch

git clone --depth 1 https://github.com

Move into the directory

cd openemr

3. Change the Remote to your GitLab Instance

Now, you need to point the local folder away from GitHub and toward your GauntletAI instance:

Remove the GitHub link

git remote remove origin

Add your new GitLab repo as the 'origin'# (Replace the URL below with the one you copied in Step 1)

git remote add origin https://gauntletai.com

4. Push the Code to GitLab

Since you have no history, this push will be very fast and will only occupy a fraction of the space on your GitLab server:

Push the main branch to your new remote

git push -u origin master

Why this saves you space:

  • GitHub Full Clone: ~1.5GB+ (includes every version of OpenEMR since the project started years ago).
  • Depth 1 Push: ~200MB - 300MB (only the files needed to run the current version).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment