Welcome to the installation guide for the Universal Commits Migrator (UCM). This tool is designed to migrate your commit history from source control management platforms like GitLab to a GitHub repository as empty commits.
This document provides detailed instructions to help you set up and install the tool on your local machine.
Before you begin the installation process, ensure you have the following prerequisites:
read_api
scope to fetch commit data from your GitLab account. Create one here.repo
scope to push commits to your GitHub repository. Create one here.Clone the Universal Commits Migrator (UCM) repository to your local machine using the following command:
git clone https://github.com/AhmedRaafat14/universal-commits-migrator.git
Change into the project directory with:
cd universal-commits-migrator
The tool uses environment variables for configuration. Rename the provided .env.template
to .env
and fill in your details:
# Rename .env.template to .env
mv .env.template .env
# Edit the .env file with your favorite editor (vim, nano, etc.)
nano .env
Inside the .env
file, you will need to provide the following information:
GITLAB_API_URL
: Your GitLab API URL.CONTRIBUTED_PROJECTS
: (Optional) Specify project IDs to fetch commits from, separated by commas.GITLAB_TOKEN
: Your GitLab Personal Access Token.GITHUB_API_URL
: Your GitHub API URL (pointing to the specific repository).GITHUB_API_VERSION
: The GitHub API version (default is 2022-11-28).GITHUB_BRANCH_TO_COMMIT_TO
: The branch to which you want to push commits (default is master
).GITHUB_USERNAME
: Your GitHub username.GITHUB_EMAIL
: Your GitHub email address.GITHUB_TOKEN
: Your GitHub Personal Access Token.Check the Configuration docs for more details on this.
Run the following to ensure the installation of any dependencies:
go mod tidy
This command will download and install any required dependencies for the project.
Ensure everything is set up correctly by running a simple command to check if the application runs without errors:
go run main.go
If you see a log output without errors and the tool displays fetching and pushing steps, your installation is successful.
After successfully installing the Universal Commits Migrator (UCM), you may proceed to run the tool following the usage instructions detailed in the /usage/usage.md
document.
For any issues during the installation or any further assistance, please check the /troubleshooting/troubleshooting.md
document or open an issue in the GitHub repository.
Thank you for installing the Universal Commits Migrator (UCM). Happy migrating!