Create a private version of the Magento Gitpod starter repository

How to clone the Github repository for your private Magento projects

Creating a private fork of the "Magento + Gitpod" repository located at, follow these steps.

This process is necessary because GitHub does not permit direct private forking of public repositories. 

1. Create a Bare Clone of the Repository : This creates a temporary bare clone of the repository. Perform this step in any directory on your computer, as this cloned folder will be removed later.


$ git clone --bare

2. Create a New Private Repository on GitHub : Name this new repository as you prefer, relating it to your Magento + Gitpod project. If you're unable to create a private repository, consider applying for GitHub's Student Developer Pack for unlimited private repositories.

3. Mirror-Push the Bare Clone to Your New Repository : After creating your new private repository on GitHub, mirror-push the cloned content to this repository. Replace <user_name> with your GitHub username and <new_private_repo_name> with the name of your new repository.

Navigate to the cloned directory:


$ cd magento-gitpod.git

Then execute the mirror-push command:


$ git push --mirror<user_name>/<new_private_repo_name>.git

4. Remove the Temporary Local Repository : Once you have successfully mirror-pushed the contents, you can remove the temporary local repository.


   cd ..
   rm -rf magento-gitpod.git

5. Clone Your New Repository Locally : To work on your project, clone the new private repository to your machine. Choose a directory where you wish to clone; for example, in a `code` folder:


   cd ~/workspace/new-magento-project
   git clone<user_name>/<new_private_repo_name>.git

6. Add the Original Repository as a Remote (Optional) : If you wish to stay updated with potential future changes from the original Magento + Gitpod repository, add it as a remote. Ensure you disable push to this remote to avoid accidental push attempts.


git remote add gitpod-magento-upstream
git remote set-url --push gitpod-magento-upstream DISABLE

Verify your remotes:


$ git remote -v

You should see your repository as `origin` and the original Magento + Gitpod repository as `gitpod-magento-upstream`.

7. Fetch and Rebase from Upstream (Optional) : To incorporate changes from the original repository into your work, fetch from `upstream` and rebase.


   git fetch gitpod-magento-upstream
   git rebase gitpod-magento-upstream/master


By following these steps, you'll have successfully created a private fork of the Magento + Gitpod project, ready for personal or team development.

Thanks to the original Github private fork here

Learn more about Gitpod and Magento on our Teachable site



Ready to start your next project?

See how we can help you accelerate your business