Skip to content
PHASE 10Advanced1 week

GitHub and Collaboration

Objective: Push your work to GitHub, use branches and pull requests, and understand collaborative workflows.

The Mission

Git is the tool. GitHub is where your code lives online. It's how teams collaborate, how open-source software is built, and how you'll share your work with employers. You've been using Git locally since Phase 3. Now it's time to go remote.

The workflow: main branch stays clean. Create a branch for new work. Do the work. Merge back when done.

Remote and branching commands
  • git remote add origin <url>Link your local repo to GitHub
  • git push -u origin mainPush to GitHub for the first time
  • git pushPush new commits after initial setup
  • git pullPull changes from GitHub to your local machine
  • git clone <url>Download someone else's repository
  • git branchList branches (* is where you are)
  • git checkout -b feature-nameCreate and switch in one command
  • git merge feature-nameMerge a branch into your current branch
  • git branch -d feature-nameDelete a branch after merging
The Challenge5 tasks
  1. 1

    Push your existing course-notes/ repo to GitHub. All your commit history from Phase 3 onward should be visible.

  2. 2

    Create a branch called add-system-report. Add a new file. Commit it. Push the branch. Open a Pull Request on GitHub. Review your own changes. Merge to main.

  3. 3

    Create a .gitignore file that ignores .swp, .tmp, and __pycache__/. Commit and push.

  4. 4

    Find an open-source project on GitHub that interests you. Clone it. Read its README. Review its commit history with git log --oneline. Document what you observe.

  5. 5

    Make a small edit to a file on GitHub directly using the web editor. Then git pull on your local machine. Understand what happened.

The Log
course-notes/phase-10-github/
  • github-setup.md
    How you connected your local repo to GitHub, your first push, any authentication issues (SSH key vs. HTTPS token).
  • branching-workflow.md
    The branch/PR workflow you used, with terminal output.
  • open-source-review.md
    The project you cloned, its structure, and what you learned from reading someone else's code.
Resources
All phases