Steps to Structure & Push Two Questions to One GitHub Repo
1. Ensure you are in your repo root (folder named with your roll number, e.g., 2200031577):
cd /path/to/2200031577
2. Create folders for each question:
mkdir Question1 Question2
3. Place your code:
- For Q1 (React frontend):
• Generate: npx create-react-app Question1
• Or move existing app: mv /path/to/reactapi/* Question1/
- For Q2 (API/backend or another project):
• Create files/folders inside Question2/
4. Create a .gitignore file in the root to ignore dependencies:
echo "node_modules/" > .gitignore
echo ".DS_Store" >> .gitignore
5. Initialize Git (if not already):
git init
6. Stage and commit Question1:
git add Question1/
git commit -m "Add Question1 solution"
7. Stage and commit Question2:
git add Question2/
git commit -m "Add Question2 solution"
8. Add your GitHub remote (only once):
git remote add origin https://github.com/your-username/2200031577.git
9. Ensure you're on the main branch:
git branch -M main
10. Push all commits to GitHub (both Q1 & Q2 on the same branch):
git push -u origin main