Using Git Locally

Git is an important skill for any front-end engineer working in any job to master. Let's learn more about it in this lesson.

Git jargon

Git uses a very particular vocabulary, and familiarity with it will make it easier for you to communicate with your team members and the online community. Here are some common terms:

Repository

To put it simply, a project is a repository. Git repositories, or ‘repos,’ contain all of the code and version history of a certain project.

Working directory

The working directory is the folder on your local computer where your project exists. Git would track any changes made within that folder.

Commit

Git does not save or store any changes made to the files within your working directory until you ‘commit’ it. Commits save the changes you made to Git itself.

Staging

However, suppose you made changes to 8 files within your working directory, but you only want to commit four of them for now because the others are buggy or not complete yet. How do you commit only four files? Well, you put them in the ‘staging area,’ after which you commit. Staging a file means that you have marked it for a commit.

Checking if Git is installed

If you’re following along on a local setup (you don’t have to, but just in case you are), start by checking if Git exists on your system with the following command.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.