Getting started with GitLab: How to import your projects to GitLab

Table of Contents
- Importing Projects with Git Initiated
- Importing Projects with Git Non-Initiated
- Importing from Online Sources
- GitLab Sources
- Importing the Project
- Summary
Importing Projects with Git Initiated
If Git is already initiated in your local project, create a new project in GitLab and obtain the SSH or HTTPS URL. Then, switch to your terminal, backup your existing Git origin, add the GitLab remote URL, and push all existing branches and tags to GitLab.
Importing Projects with Git Non-Initiated
If Git is not initiated in your project, initialize Git, commit existing files, and push to GitLab.
Importing from Online Sources
You can import projects from GitLab.com or other platforms to another GitLab instance using the project import feature, which migrates project files and components from different sources.
GitLab Sources
Projects can be exported from GitLab.com and self-managed instances using the Export project feature in the project settings.
Importing the Project
To import a project in GitLab, click on the New project button, select Import project, and choose GitLab Export as the import source. You can also import from GitHub and Bitbucket using different methods.
GitHub
Import GitHub projects to GitLab using GitHub OAuth, GitHub personal access token, or the API.
Bitbucket
Import projects from Bitbucket to GitLab using OAuth for Bitbucket Cloud or URL, username, and personal access token for Bitbucket Server. The GitLab Import API can also be used for importing Bitbucket projects.
Summary
Importing and migrating projects between GitLab instances and from other sources requires planning to ensure a clear understanding of what gets imported and using the appropriate method. Refer to the GitLab documentation for detailed information on supported import methods to plan your migration effectively.