Skip to main content

GitHub Commits and Pull Requests

Welcome to another Bite-Sized tutorial! This video covers the essentials of GitHub Commits and Pull Requests — two core tools for managing and collaborating on code.

Commits

Commits are snapshots of your project’s state—save your work often with clear messages.

Pull Requests

Pull requests let you propose, discuss, and merge changes from one branch into another.

GitHub Commits and Pull Requests – Key Takeaways

  • What is a Commit?
    A commit saves your changes to the project with a message explaining what you did. It’s like a save point in your work history.

  • Creating Commits:

    • Edit your files and click “Commit changes”.
    • Write a clear commit message and optionally add a description.
  • Viewing Commit History:

    • Head to the “Commits” tab to see all past snapshots, who made them, and when.
  • What is a Pull Request?

    • A way to propose merging changes from your branch into the main branch.
    • Team members can review, comment, and approve before merging.
  • Creating and Merging Pull Requests:

    1. Click “Contribute” → “Open Pull Request”.
    2. Select the source (feature) and target (main) branches.
    3. Add a title and description explaining your changes.
    4. After approval, click “Merge pull request” and confirm.
    5. Delete the feature branch when done.

Next Steps: Explore how to connect GitHub with your coding environment, like VSCode, in our upcoming tutorials!