Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to Git!
You have completed Introduction to Git!
Preview
An overview of how the Git version control system works.
Video Review
- Git is a version control system. It helps you control the different versions of the files in your project.
- The collection of all the old versions of your project's files is known as a Git repository. It's basically just a folder in which you can edit your files, then run Git commands to store your changes.
- Each time you complete a change to some or all of your project's files, you can take a snapshot of their current contents. These snapshots are known as commits.
- Git is a distributed version control system, as opposed to a centralized system. In a distributed system, you can copy a complete repository with the full project history to every developer's machine.
- Bash is a command shell that runs on many Mac, Linux, and even some Windows computers when you open their terminals.
- Bash prompts usually end in a dollar sign. When you read Git tutorials out on the web, you may see a dollar sign; that usually indicates that the text following it should be typed at a shell prompt.
- When Git is installed on a system, like it is here in this workspace, it places an executable named
gitwhere it can be run from any shell prompt. This is thegitcommand. - All the commands we're going to show you during this course will use this executable, so they're all going to start with
gitfollowed by a space. - Then we need to specify the subcommand or options we want.
- Git command line options consist of either a single dash followed by a single letter, or a double-dash [type
--] followed by a word. -
git --helpwill print out some help on using the Git program.
Common Git subcommands
- The
git cloneandgit initcommands are used to setup new repositories. - The
git add,git status, andgit commitcommands are the most frequently used subcommands in all of Git. They're used when committing new versions of files. - The
git logcommand is also important; it lets you view a list of your old commits. - The
git mvandgit rmcommands move and remove files that are being tracked by Git. We'll learn about those in Stage 2 of this course. - The
git pushandgit pullcommands are used to synchronize commits with Git repositories on other computers. We'll learn about those in Stage 3.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Git is a version control system.
0:00
It helps you control the different
versions of the files in your project.
0:01
It keeps track of all the changes
to your files over time.
0:05
If you ask it to, it can reset any files
contents to match a previous version.
0:09
Or, more commonly,
0:14
you can reset the version of all
the project files at the same time.
0:15
The collection of all the old
versions of your projects files
0:19
is known as a Git repository.
0:22
It's basically a folder in
which you can edit your files
0:24
then run Git commands
to store your changes.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up