0% found this document useful (0 votes)
8 views1 page

Git Two Questions

This document outlines the steps to structure and push two questions to a single GitHub repository. It includes creating folders for each question, placing code, initializing Git, staging and committing changes, adding a remote, and pushing to GitHub. The process ensures both questions are organized and uploaded to the same branch in the repository.

Uploaded by

room3773
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Git Two Questions

This document outlines the steps to structure and push two questions to a single GitHub repository. It includes creating folders for each question, placing code, initializing Git, staging and committing changes, adding a remote, and pushing to GitHub. The process ensures both questions are organized and uploaded to the same branch in the repository.

Uploaded by

room3773
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like