2.0 KiB
2.0 KiB
Manual GitHub Upload Instructions
Prerequisites
- Make sure Git is installed on your computer
- Have a GitHub account (username: shaurya05745)
- Create a personal access token on GitHub:
- Go to https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Give it a name like "Website Upload"
- Check the "repo" scope box
- Click "Generate token"
- Copy the token immediately (you won't be able to see it again)
Option 1: Run the batch file
- Open the file explorer and navigate to C:\Users\Lenovo\sample-website
- Double-click on "upload-website-to-github.bat"
- Follow the prompts in the terminal
- When asked for your password, enter the personal access token you created
Option 2: Manual Git commands
If the batch file doesn't work, open a new PowerShell window and run these commands:
# Navigate to your website folder
cd C:\Users\Lenovo\sample-website
# Initialize Git if not already initialized
git init
# Add all files
git add .
# Commit the files
git commit -m "Upload entire website"
# Set the remote repository URL
git remote set-url origin https://github.com/shaurya05745/website.git
# If you get "remote origin not found" error, use this command instead:
# git remote add origin https://github.com/shaurya05745/website.git
# Push to GitHub (you'll be prompted for credentials)
git push -u origin master
# When prompted for password, use your personal access token, not your GitHub password
Option 3: GitHub Desktop (Easiest)
- Download and install GitHub Desktop from https://desktop.github.com/
- Sign in to your GitHub account
- Add your local repository (File > Add Local Repository...)
- Navigate to C:\Users\Lenovo\sample-website
- Click "Publish repository"
- Enter "website" as the name
- Click "Publish Repository"
After uploading
- Visit https://github.com/shaurya05745/website to confirm your files were uploaded
- You can enable GitHub Pages in the repository settings to publish your website