git_learning
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| git_learning [2025/02/09 10:40] – [Understanding Local Folder] smickster | git_learning [2025/02/09 10:42] (current) – [Understanding Local Folder] smickster | ||
|---|---|---|---|
| Line 72: | Line 72: | ||
| However, if you want to share your entire website folder with others, you'll need to make sure that GitHub is set up to serve files from that folder. By default, GitHub serves files from the root of your repository, which might not be the same as your local `htdocs` folder. | However, if you want to share your entire website folder with others, you'll need to make sure that GitHub is set up to serve files from that folder. By default, GitHub serves files from the root of your repository, which might not be the same as your local `htdocs` folder. | ||
| - | To share your entire website folder with others, you'll need to create a new repository on GitHub and then link it to your local repository using Git. You can do this by running the following command in your terminal: | + | To share your entire website folder with others, you'll need to create a new repository on GitHub and then link it to your local repository using Git. You can do this by running the following command in your terminal: |
| - | ```bash | ||
| git remote add origin https:// | git remote add origin https:// | ||
| - | ``` | ||
| - | Then, you can push your changes to GitHub using: | + | Then, you can push your changes to GitHub using: |
| - | ```bash | ||
| git push -u origin master | git push -u origin master | ||
| - | ``` | ||
| However, this will only push the files in your local repository, not the entire `htdocs` folder. To share the entire folder, you'll need to create a new repository on GitHub and then link it to your local repository using Git. | However, this will only push the files in your local repository, not the entire `htdocs` folder. To share the entire folder, you'll need to create a new repository on GitHub and then link it to your local repository using Git. | ||
git_learning.1739097659.txt.gz · Last modified: by smickster
