What is Git and GitHub?

GitHub is a programing organization tool that not only can store all your programs nicely but allow you to collaborate with others on the same “repository” (or 304/314 project folder in layman’s terms).

In this video, you will be walked through how to set up a GitHub repository for your team, how to set up individual branches for each team member, and how to utilize GitHub to easily contribute changes you make to a file on your computer through the app, and then online to the main branch. While the video works with an Arduino file and IDE, GitHub can also manage C/C++ files and work with the PSoC and MPLAB IDE’s as well. All that matters is that you are editing the files located in your local “GitHub” folder, which is linked to the GitHub Desktop app on it’s own. Editing files outside the GitHub folder linked to the desktop app cannot be pushed through the app to the online repository.

As mentioned in the video, GitHub can be a weird transition and hard to follow. Always reach out for help from the teaching staff if you need it, and feel free to YouTube videos on how to use GitHub. Good luck!





Git Workflow



git workflow

Git moves data between four distinct stages. Refer to your diagram to see how these commands act as the “transport” system:

  • Workspace (Working Directory): This is where you actually edit files. Git sees these as “Untracked” or “Modified.”
  • Staging Area (Index): A “pre-commit” zone. You use git add to tell Git, “I want these specific changes to be in my next snapshot.”
  • Local Repository: This is on your computer. When you git commit, Git saves a permanent snapshot of your staged files here.
  • Remote Repository: Hosted on the internet (GitHub). You git push to share your local work or git pull to grab others’ work.

Git vs. GitHub: What’s the Difference?

While they are often mentioned together, they serve very different purposes in your development workflow.

Git: The Engine (Local)

  • What it is: A piece of software that runs on your computer.
  • Function: It tracks the history of your files and handles the arrows on the left side of your diagram (Workspace → Index → Local Repo).
  • Requirement: It does not require an internet connection to work. You can commit and branch entirely offline.

GitHub: The Hub (Remote)

  • What it is: A cloud-based hosting service for Git repositories.
  • Function: It acts as the “Remote Repository” on the right side of your diagram. It provides a web interface to view code, manage projects, and collaborate with others.
  • Extra Features: GitHub adds social and management layers that Git doesn’t have, such as:
  • Pull Requests: A way to ask a project owner to “pull” your changes into their code.
  • Issues: A built-in bug tracker and “to-do” list for the project.
  • GitHub Actions: The automation tool you are using to deploy your Jekyll site.

How they interact

When you use the command git push origin main, you are telling the Git software on your computer to send your local snapshots up to the GitHub servers. This bridges the gap between your private work and the public (or shared) project.

External Resources