Setting Up Your GitLab Repository with GitHub Source
To clone a GitHub repo and maintain it in your own GitLab repository while periodically pulling updates from the original source, you'll need to set up multiple remotes. Here's a step-by-step process:
Initial Setup
-
Clone the original GitHub repository. Using ComfyUI as example.
-
Create a new empty repository on GitLab through the GitLab web interface
-
Change the remote URL to point to your GitLab repository:
-
Push your code to GitLab:
(Usemaster
instead ofmain
if that's the main branch name)
Making Your Changes
-
Create a branch for your customizations:
-
Make your changes, commit them:
-
Push your changes to GitLab:
Updating with Changes from GitHub
-
To pull changes from the original GitHub repository:
-
To apply GitHub updates to your customized branch:
Alternative Workflow
If you prefer to keep your customizations on the main branch:
- After initial setup, make your changes directly on main
- When you want to update from GitHub: