|
| 1 | +--- |
| 2 | +title: About source code imports using the command line |
| 3 | +intro: 'You can use command line tools to import source code and its revision history to {% data variables.product.product_name %}.' |
| 4 | +versions: |
| 5 | + fpt: '*' |
| 6 | + ghes: '*' |
| 7 | + ghae: '*' |
| 8 | + ghec: '*' |
| 9 | +shortTitle: About source code imports |
| 10 | +--- |
| 11 | + |
| 12 | + |
| 13 | +{% ifversion fpt or ghec %} |
| 14 | + |
| 15 | +If you want to import a Git repository that is stored on a code hosting service that is publicly available on the internet, we recommend using GitHub Importer. For more information, see "[AUTOTITLE](/migrations/importing-source-code/using-github-importer)." |
| 16 | + |
| 17 | +If your source code is not tracked by Git or is not publicly available, you can use the command line instead. |
| 18 | + |
| 19 | +{% else %} |
| 20 | + |
| 21 | +You can use the command line to import source code and, if the code has been tracked using a version control system like Git, the code's revision history. |
| 22 | + |
| 23 | +{% endif %} |
| 24 | + |
| 25 | +- To import a Git repository that is stored on a code hosting service{% ifversion fpt or ghec %} that is not accessible from the public internet{% endif %}, see "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)." |
| 26 | +- To import code that is only stored locally, and is either tracked by Git or not tracked by any version control system, see "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github)." |
| 27 | +- To import code that is tracked by any version control system other than Git, first convert the repository to Git, then push the Git repository to {% data variables.product.product_name %}. |
| 28 | +{% ifversion fpt or ghec or ghae %} |
| 29 | + - "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-subversion-repository)" |
| 30 | + - "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-mercurial-repository)" |
| 31 | + - "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-team-foundation-version-control-repository)" |
| 32 | +{% else %} |
| 33 | + - End users can use third-party conversion tools. |
| 34 | + - "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-subversion-repository)" |
| 35 | + - "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-mercurial-repository)" |
| 36 | + - "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-team-foundation-version-control-repository)" |
| 37 | + - Site administrators can use the administrative shell. For more information, see "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-from-other-version-control-systems-with-the-administrative-shell)." |
| 38 | +{% endif %} |
| 39 | + |
| 40 | +All of these tools import source code and revision history, only. If you also want to import your settings and your collaboration history, such as issues and pull requests, you'll need to use more advanced tools. To determine the best tool to use for your migration, see "[AUTOTITLE](/migrations/overview/planning-your-migration-to-github)." |
0 commit comments