Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Git & Github

Emily Stewart edited this page Oct 28, 2015 · 1 revision

Git & Github

We will also be incorporating Git (via Github) for this assignment.

What is Github?

Git is a version control system for storing and taking "snapshots" of your code.

Using these snapshots, it allows multiple people to work on the same codebase by comparing additions (code added since last snapshot) and deletions (code deleted since last snapshot).

Example

A startup is developing a new site for rating new bakeries. The two developers, Kenan and Kel, are distributing the work evenly. They work remotely and use Git as a vital part of their workflow.

Kenan: Today, I'm going to tackle the navigation.

Kel: Great, I'm focused on the search component.

Lunch Break

Kenan: Hey Kel, brb. I'm going to grab a burger, but I just pushed my changes.

Kel: Ok, I'll check them out soon.

Later

Kel: I'm at a good stopping point and I'm starving. I'm going to commit my code.

Attempts to commits code

Kel: Hmm, one small merge conflict. (looks at files) Oh, I see that's just Kenan's placeholder code conflicting with mine. I can delete his line. Save. And Push!

Few hours later

Kenan: Let's see what Kel's been up to. (pulls changes) Oh good! He swapped out that placeholder search bar.


Git seamlessly merges changes in a repo's files. When it sees conflicts, it prompts you to fix them. This makes for easy-peasy collaboration.

Think of it like Google Drive's version history, except way more magical and powerful. 🌈 ⚡

Clone this wiki locally