Course Preview Mode
You are viewing one of 4 sample lessons from this course.
What is Git?
Git is what is called a "Version Control System" or VCS. Many VCSs have existed over the course of time, is is just one of them and currently, by far the most popular one. We'll be diving into what exactly this term means in the next few lessons. But first, it will be important to understand why we'd want to use Git to begin with. Let's cover a handful of Git use cases.
Use Case 1: Capturing Changes
If you've played a video game or two in your life, you probably can understand the concept of a save point. Before a key moment in the game, you will probably want to save your progess. This isn't any random point in the game though. Most likely, you save your work after you've accomplished something or at a place where you can load the game later.
Capturing changes using Git is the same concept. We "version" or save a "snapshot" of the coding project we are working on so it is easy to resume it later.
In the next module, we'll cover this concept of "versioning" further. Let's cover a few more uses cases first.
Use Case 2: Effective Collaboration
Writing code is like writing a book with a team of other writers as well as editors. The same scenario exists with software engineering teams. Team members are responsible for not only writing code, but editing code as well.
This writing and editing process, like one does with a actual book, revolves around a collaboration and review process.
An engineer wiil propose a set of changes to some code. That code will then be reviewed, commented on, critiqued and recommendations may be made on how to make that code clearer, consistent, more readable, efficient and effective.
Therefore, as software engineers typically work on teams, you can probably imagine this review and collaboration process could become a bit chaotic. Git provides features that allow engineers to carefully make changes to code that is under this review process easy and efficient.
Use Case 3: Understanding complex changes
Yet another need for Git is to understand the changes that other developers are making to your codebase. Let's say you come back from a long vacation and want to see what exactly changed about your code. You can simply look at the version snapshots that other developers have made to understand what has changed and when.
For complex projects, where development teams create different chains of versions of code, for each feature they work on, using Git is critical to reviewing and publishing these features in an organized and clean way. Git provides the core features teams need to carefully review what changes are being made across many different teammates and provides a way to capture these changes in an easily consumable way.
While Git alone helps with this, additional tools are typically used, such as a GUI based client or a GitHub.com Pull Request (something we'll learn in a later module). At minimum, using a command line with Git provides a lot of basic features to help engineers understand complex features.
Use Case 4: Correcting Mistakes
As we make progress when we write code and take "snapshots" of our code, we sometimes will want to revert our changes. Git makes it straightforward to do this as well.
This becomes more critical when Git is used in conjuntion with other tools that will automatically deploy a change for users.
When we say "deploy", this simply means that a software feature we write will be disributed to users. Say we have a website, if we make a change, often teams will use Git to detect that a change has been made and when that happens, update a website incorporating said change.
Another example is a mobile app. When a change is made, teams can set up their project to detect that change, re-build and re-submit a mobile app update to their app store(s).
This means that when there is a critical bug introduced to users, we can relatively easily revert that change using Git, allowing users to receive that important but fix quickly. Additionally, because Git allows engineers to easily understand what change was made and when, bug fixes become easy to investigate and troubleshoot.
There's More
There are many more reasons and situations where one would use Git but hopefully there are simple and clear enough to get a basic understanding and foundation for this course. The intent here is to motivate you as to why you're learning the skills that you will learn.
Next up: Course Requirements