Skip to content

Import your Gitlab contribution history into Github with a Python script

License

Notifications You must be signed in to change notification settings

joeloftusdev/get-gitlab-contribution-history

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

GitLab to GitHub Contribution History Transfer Script

This script transfers the commit history from a GitLab repository to Github. It performs the following tasks:

  1. Clones the GitLab repository locally.
  2. Removes files from the Git history with specified extensions such as Images and gifs to speed up the process.
  3. Adds a remote pointing to the GitHub repository.
  4. Pushes the filtered commit history to a new branch on the GitHub repository.
  5. Merges the new branch into the existing GitHub repository.

Usage

Prerequisites

  • Python installed.
  • Both GitLab and GitHub repositories accessible with the appropriate permissions.

Running the Script

  1. Clone this repository to your local machine:

    git clone <repository-url>
  2. Navigate to the directory containing the script:

    cd <repository-directory>
  3. Run the script gl2gh.py with the following command, provide the URLs of the GitLab and GitHub repositories as arguments:

    python gl2gh.py <gitlab_repo_url> <github_repo_url>

    Replace <gitlab_repo_url> with the URL of the GitLab repository and <github_repo_url> with the URL of the GitHub repository.

Note

  • Ensure that you have the necessary permissions to clone, push, and merge branches in both the GitLab and GitHub repositories.
  • Review the SKIP_EXTENSIONS list in the script to verify that it matches the file extensions you want to exclude from the transfer.

Your History after!

after

License

This script is licensed under the MIT License.

About

Import your Gitlab contribution history into Github with a Python script

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages