WalzoneInterview Prep
📞 Interviewing soon? Practice with a realistic AI mock phone interview — it calls you, then scores you. First 15 min FREE →

Git · Basic · question 1 of 100

What is Git?

📕 Buy this interview preparation book: 100 Git questions & answers — PDF + EPUB for $5

Git is a version control system that allows developers to manage changes to their codebase over time. It was created in 2005 by Linus Torvalds, the creator of Linux, and has since become one of the most widely used version control systems in the world.

Git is designed to be distributed, which means that every developer working on a project has a complete copy of the codebase, including the entire history of changes. This allows developers to work on their own copy of the codebase without interfering with each other, and to easily share their changes with others when they’re ready.

One of the key features of Git is its ability to track changes to files over time. Each time a developer makes a change to a file, Git records the changes as a commit, along with a message describing what was changed. These commits are then organized into branches, which allow developers to work on different versions of the codebase simultaneously.

Git also includes features for managing conflicts that arise when multiple developers make changes to the same file. When conflicts occur, Git provides tools for resolving them and merging the changes together.

Finally, Git includes features for collaborating with other developers, including the ability to push and pull changes to and from remote repositories, as well as tools for reviewing and commenting on changes made by other developers.

Here is an example of how Git can be used in practice:

Suppose you’re working on a team that is developing a web application. You’ve just been assigned a new feature to work on, and you want to start making changes to the codebase.

First, you would create a new branch in Git to work on your changes. This would allow you to make changes to the codebase without interfering with the work being done by other developers.

    git checkout -b my-feature-branch

Next, you would make changes to the codebase to implement your new feature. As you make changes, you would use Git to track your progress, making commits along the way with messages describing what was changed.

    git add .
    git commit -m "Add new feature to web application"

Once you’ve finished making your changes, you would push them to a remote repository so that other developers on your team can review and comment on them.

    git push origin my-feature-branch

Finally, once your changes have been reviewed and approved, you would merge them back into the main branch of the codebase so that they become part of the official version of the application.

    git checkout main
    git merge my-feature-branch

This is just a simple example of how Git can be used. In practice, Git can be used to manage much more complex codebases with multiple developers working on many different features simultaneously.

Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic Git interview — then scores it.
📞 Practice Git — free 15 min
📕 Buy this interview preparation book: 100 Git questions & answers — PDF + EPUB for $5

All 100 Git questions · All topics