{"meta":{"title":"Using the command line to import source code","intro":"To import source code that is not accessible from the public internet, you can use command line tools.","product":"Migrations","breadcrumbs":[{"href":"/en/migrations","title":"Migrations"},{"href":"/en/migrations/importing-source-code","title":"Import source code"},{"href":"/en/migrations/importing-source-code/using-the-command-line-to-import-source-code","title":"Command line"}],"documentType":"subcategory"},"body":"# Using the command line to import source code\n\nTo import source code, you can use command line tools.\n\n## Links\n\n* [About source code imports using the command line](/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/about-source-code-imports-using-the-command-line)\n\n  You can use command line tools to import source code and its revision history to GitHub.\n\n* [Adding locally hosted code to GitHub](/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github)\n\n  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 using GitHub CLI or Git commands.\n\n* [Importing an external Git repository using the command line](/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)\n\n  If your source code is tracked in a Git repository, you can import the repository using Git on the command line.\n\n* [Importing a Subversion repository](/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-subversion-repository)\n\n  You can import a repository from Subversion by converting the repository to Git, then pushing the Git repository to GitHub.\n\n* [Importing a Mercurial repository](/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-mercurial-repository)\n\n  You can import a repository from Mercurial by converting the repository to Git, then pushing the Git repository to GitHub.\n\n* [Importing a Team Foundation Version Control repository](/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-team-foundation-version-control-repository)\n\n  You can import a repository from Team Foundation Version Control (TFVC) by converting the repository to Git, then pushing the Git repository to GitHub.\n\n* [Importing from other version control systems with the administrative shell](/en/importing-from-other-version-control-systems-with-the-administrative-shell)\n\n  Using the administrative shell, you can import from Subversion, Mercurial and Team Foundation Version Control to Git repositories on GitHub Enterprise Server."}