git

πŸ“Œ Previous: 🏠 Homepage

🀝 Topics Covered for Day 2

  1. πŸš€ Introduction
  2. 🌿 Branching in Git
  3. πŸ“ Making Changes & Committing
  4. βœ… Pushing Changes
  5. πŸ”„ Cloning a Repository
  6. 🍴 Forking a Repository
  7. πŸ” Opening a Pull Request (PR)
  8. πŸ‘₯ Adding Collaborators
  9. πŸ”€ Merging the PR into Main
  10. ⚑ Resolving Merge Conflicts
  11. πŸ“‹ Summary & Cheatsheet
  12. πŸ“ Hands-On Exercise

  1. Branching in Git
    • What is a branch?
    • Why use branches?
    • Creating a branch: git branch, git checkout -b
    • Switching branches: git checkout, git switch
    • Best practices for naming branches
  2. Making Changes & Committing
    • Editing files
    • Staging and committing changes
  3. Pushing Changes
    • git push origin branch-name
  4. Cloning a Repository
    • Cloning your own repo vs. a forked repo
    • git clone command
    • Next steps after cloning: branching, making changes, committing, pushing
  5. Forking a Repository
    • What is forking?
    • Why fork instead of clone?
    • How to fork a repo on GitHub
    • Adding the original repo as upstream (for syncing)
  6. Open a Pull Request (PR)
    • What is a PR?
    • How to open a PR on GitHub
    • PR title and description
  7. Adding Collaborators (Alternative to Forking)
    • How to add collaborators
    • Permissions required
    • Cloning as a collaborator
  8. Merging the PR into Main
    • Reviewing and merging PRs
    • Pulling merged changes locally
  9. Resolving Merge Conflicts
    • What are merge conflicts?
    • How to resolve them

Summary Table for Day 2

Topic Description/Goal
Branching Work on features/changes without affecting main branch
Making Changes Edit, stage, and commit code
Pushing Changes Upload your branch to GitHub
Cloning Get a local copy of a repo (forked or original)
Forking Work independently on a copy of a repo
Pull Requests Propose your changes for review and merging
Collaborators Work directly if added as a team member
Merging PRs Integrate changes into the main branch
Merge Conflicts Handle conflicting changes between branches

Tip:

➑️Up Next: 🌿 Branching in Git