title | intro | versions | shortTitle | ||||||
---|---|---|---|---|---|---|---|---|---|
About source code imports using the command line |
You can use command line tools to import source code and its revision history to {% data variables.product.github %}. |
|
About source code imports |
{% data reusables.repositories.importing-context %}
{% ifversion fpt or ghec %}
If you want to import a Git repository to {% data variables.product.prodname_dotcom_the_website %}, and the repository is stored on a code hosting service that is publicly available on the internet, we recommend using {% data variables.product.prodname_importer %}. For more information, see AUTOTITLE.
If your source code is not tracked by Git or is not publicly available, you can use the command line instead.
{% else %}
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.
{% endif %}
- 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.
- To import code that is only stored locally, and is either tracked by Git or not tracked by any version control system, see AUTOTITLE.
- 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.github %}. {% ifversion fpt or ghec %}
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.
{% ifversion fpt or ghec %}
- AUTOTITLE {% endif %}