You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github.md
+11-8Lines changed: 11 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,25 @@
1
1
---
2
-
title: Adding an existing project to GitHub using the command line
3
-
intro: 'Putting your existing work on {% data variables.product.product_name %} can let you share and collaborate in lots of great ways.'
2
+
title: Adding locally hosted code to GitHub
3
+
intro: 'Learn how to add existing source code or repositories to {% data variables.product.product_name %} from the command line using {% data variables.product.prodname_cli %} or Git Commands. Then, share your code and invite others to work with you.'
## About adding existing projects to {% data variables.product.product_name %}
18
+
## About adding existing source code to {% data variables.product.product_name %}
19
+
20
+
If you have existing source code or repositories stored locally on your computer or private network you can add them to {% data variables.product.product_name %} by typing commands in a terminal. You can do this by typing Git commands directly, or by using {% data variables.product.prodname_cli %}.
21
+
22
+
{% data variables.product.prodname_cli %} is an open source tool for using {% data variables.product.prodname_dotcom %} from your computer's command line. {% data variables.product.prodname_cli %} can simplify the process of adding an existing project to {% data variables.product.product_name %} using the command line. To learn more about {% data variables.product.prodname_cli %}, see "[About {% data variables.product.prodname_cli %}](/github-cli/github-cli/about-github-cli)."
18
23
19
24
{% tip %}
20
25
@@ -24,9 +29,7 @@ shortTitle: Add a project locally
24
29
25
30
{% data reusables.repositories.sensitive-info-warning %}
26
31
27
-
## Adding a project to {% data variables.product.product_name %} with {% data variables.product.prodname_cli %}
28
-
29
-
{% data variables.product.prodname_cli %} is an open source tool for using {% data variables.product.prodname_dotcom %} from your computer's command line. {% data variables.product.prodname_cli %} can simplify the process of adding an existing project to {% data variables.product.product_name %} using the command line. To learn more about {% data variables.product.prodname_cli %}, see "[About {% data variables.product.prodname_cli %}](/github-cli/github-cli/about-github-cli)."
32
+
## Adding a local repository to {% data variables.product.product_name %} with {% data variables.product.prodname_cli %}
30
33
31
34
1. In the command line, navigate to the root directory of your project.
32
35
1. Initialize the local directory as a Git repository.
@@ -47,7 +50,7 @@ shortTitle: Add a project locally
47
50
48
51
1. Alternatively, to skip all the prompts, supply the path to the repository with the `--source` flag and pass a visibility flag (`--public`, `--private`, or `--internal`). For example, `gh repo create --source=. --public`. Specify a remote with the `--remote` flag. To push your commits, pass the `--push` flag. For more information about possible arguments, see the [GitHub CLI manual](https://cli.github.com/manual/gh_repo_create).
49
52
50
-
## Adding a project to {% data variables.product.product_name %} without {% data variables.product.prodname_cli %}
53
+
## Adding a local repository to {% data variables.product.product_name %} using Git
Copy file name to clipboardExpand all lines: content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -72,4 +72,4 @@ You can upload an existing file to a repository on {% ifversion ghae %}{% data v
72
72
73
73
## Further reading
74
74
75
-
- "[Adding an existing project to GitHub using the command line](/articles/adding-an-existing-project-to-github-using-the-command-line)"
75
+
- "[Adding locally hosted code to {% data variables.product.product_name %}](/get-started/importing-your-projects-to-github/importing-source-code-to-github//adding-locally-hosted-code-to-github)"
0 commit comments