User Tools

Site Tools


git_learning

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
git_learning [2025/02/09 10:40] – [Understanding Local Folder] smickstergit_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)
  
-```bash 
   git remote add origin https://github.com/your-username/your-repo-name.git   git remote add origin https://github.com/your-username/your-repo-name.git
-``` 
  
-Then, you can push your changes to GitHub using:+Then, you can push your changes to GitHub using: (bash)
  
-```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

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki