Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-09-25. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Using the command line to import source code

To import source code, you can use command line tools.

About source code imports using the command line

You can use command line tools to import source code and its revision history to GitHub Enterprise Server.

Adding locally hosted code to GitHub

If your code is stored locally on your computer and is tracked by Git or not tracked by any version control system (VCS), you can import the code to GitHub Enterprise Server using GitHub CLI or Git commands.

Importing an external Git repository using the command line

If your source code is tracked in a Git repository, you can import the repository using Git on the command line.

Importing a Subversion repository

You can import a repository from Subversion by converting the repository to Git, then pushing the Git repository to GitHub Enterprise Server.

Importing a Mercurial repository

You can import a repository from Mercurial by converting the repository to Git, then pushing the Git repository to GitHub Enterprise Server.

Importing a Team Foundation Version Control repository

You can import a repository from Team Foundation Version Control (TFVC) by converting the repository to Git, then pushing the Git repository to GitHub Enterprise Server.

Importing from other version control systems with the administrative shell

Using the administrative shell, you can import from Subversion, Mercurial and Team Foundation Version Control to Git repositories on GitHub Enterprise Server.