-
Create a New Repository:
- Go to GitHub and log in to your account.
- Click on the "+" icon in the top right corner and select "New repository".
- Choose a name for your repository (e.g., "algebra-calculator").
- Optionally, add a description.
- Choose whether the repository will be public or private.
- Click on "Create repository".
-
Clone the Repository:
-
Open a terminal or command prompt on your local machine.
-
Navigate to the directory where you want to clone the repository.
-
Use the following command to clone the repository:
git clone https://github.com/your-username/algebra-calculator.git
Replace
your-username
with your GitHub username. -
-
Navigate to the Project Directory:
cd algebra-calculator
-
Add Your Files:
- Copy all your HTML, CSS, and JavaScript files into the project directory (
algebra-calculator
).
- Copy all your HTML, CSS, and JavaScript files into the project directory (
-
Add the Files to Git:
-
Use the following commands to add your files to Git:
git add .
-
-
Commit Your Changes:
-
Commit your changes with a descriptive message:
git commit -m "Initial commit: Add HTML, CSS, and JavaScript files"
-
-
Push Your Changes to GitHub:
-
Push your committed changes to the GitHub repository:
git push origin main
Replace
main
with the name of your main branch if it's different (e.g.,master
). -
-
Verify Your Changes:
- Visit your repository on GitHub to verify that your files have been successfully pushed.
-
Set Up GitHub Pages (Optional):
- If you want to host your project using GitHub Pages, go to your repository's settings.
- Scroll down to the "GitHub Pages" section.
- Select the branch you want to use for GitHub Pages (e.g.,
main
) and the root folder (/
). - Click on "Save" or "Choose".