Create a repository and deploy the webpage in a GitHub
1. Create a GitHub Repository
1. Log in to GitHub: Go to GitHub and log in.
2. Create a New Repository:
o Click on the "New" button or the "+" dropdown menu in the top-right corner and select "New
repository".
o Repository Name: Choose a name for your repository (e.g., my-webpage).
o Visibility: Select Public or Private.
o Click Create Repository.
3. Initialize a Local Repository
o Navigate to your local project folder in your terminal : cd/path/to/your/local/project
o Initialize Git in the folder: git init
4. Add Webpage Files
1. Create your webpage files (e.g., [Link], [Link], etc.).
2. Copy the files to the repository folder.
4. Push Changes to GitHub
1. Stage the files: git add .
2. Commit the changes: git commit -m "Add initial webpage files"
4. Add Remote Origin
1. Add the remote origin URL from GitHub: git remote add origin
[Link]
Replace your-username with your GitHub username and my-webpage with your repository name.
‘git remote add origin ’ specifies that we are adding a remote repository, with the specified URL, as an origin to
our local Git repo.
5. Push to GitHub
1. Push the local repository to GitHub:
git branch -m main
git push origin main
6. Pull local repo from GitHub :-
Git pull is used to pull all changes from a remote repository into the branch we are working on. It is a
combination of fetch and merge. Use it to update your local Git.
git pull origin main