- GitHub account (create one at https://github.com)
- Git installed on your system
- SSH key or Personal Access Token configured
- Go to https://github.com/new
- Enter repository name:
Snake_Game_with_Python - Add description: "A feature-rich Snake game with Pygame"
- Choose visibility (Public or Private)
- DO NOT initialize with README (we already have one)
- Click "Create repository"
Copy one of these commands based on your GitHub setup:
Using HTTPS (easier for beginners):
cd c:\Users\sumon\Snake_Game_with_Python
git remote add origin https://github.com/YOUR_USERNAME/Snake_Game_with_Python.git
git branch -M main
git push -u origin mainUsing SSH (if configured):
cd c:\Users\sumon\Snake_Game_with_Python
git remote add origin git@github.com:YOUR_USERNAME/Snake_Game_with_Python.git
git branch -M main
git push -u origin mainReplace YOUR_USERNAME with your actual GitHub username.
-
For HTTPS: You may be prompted for a Personal Access Token
- Go to https://github.com/settings/tokens
- Click "Generate new token"
- Select
reposcope - Copy the token and paste it when prompted
-
For SSH: Make sure your SSH key is added to your GitHub account
- Go to https://github.com/settings/keys
- Add your SSH public key
After pushing, verify your repository:
- Visit
https://github.com/YOUR_USERNAME/Snake_Game_with_Python - Confirm all files are present
- Check that the README displays properly
To push future changes:
git add -A
git commit -m "Your commit message"
git push origin main- GitHub Help: https://docs.github.com
- Git Documentation: https://git-scm.com/doc
- GitHub SSH Setup: https://docs.github.com/en/authentication/connecting-to-github-with-ssh
Your repository is now ready to be pushed to GitHub! 🚀