Skip to content

Git Version Control

Master Git Version Control with 51 free flashcards. Study using spaced repetition and focus mode for effective learning in Programming.

🎓 51 cards ⏱️ ~26 min Advanced
Study Full Deck →
Share: 𝕏 Twitter LinkedIn WhatsApp

🎯 What You'll Learn

Preview Questions

12 shown

What is Git?

Show ▼

Git is a distributed version control system that tracks changes in source code during software development, allowing multiple developers to collaborate efficiently.
It stores snapshots of files over time, enabling branching, merging, and reverting changes.

How do you initialize a new Git repository?

Show ▼

Use the command git init in the root directory of your project.
This creates a hidden .git subdirectory containing all repository data.

What does <code>git clone</code> do?

Show ▼

git clone <url> creates a copy of an existing remote repository on your local machine.
It includes all branches, tags, and history.

What is the purpose of <code>git add</code>?

Show ▼

git add <file> stages changes in the working directory for the next commit.
You can stage all changes with git add . or specific files.

What does <code>git commit</code> accomplish?

Show ▼

git commit -m "message" saves the staged changes to the local repository as a snapshot.
The commit message should describe the changes concisely.

How do you check the status of your repository?

Show ▼

git status shows the state of the working directory and staging area.
It lists modified, untracked, and staged files.

What information does <code>git log</code> provide?

Show ▼

git log displays the commit history, including commit hashes, authors, dates, and messages.
Use options like --oneline or --graph for compact views.

What is the Git working directory?

Show ▼

The working directory is the filesystem where you edit files and where Git tracks changes.
It contains files checked out from the repository.

What is the Git staging area (index)?

Show ▼

The staging area holds a snapshot of changes ready to be committed.
Changes must be added here with git add before committing.

What is a commit in Git?

Show ▼

A commit is a snapshot of the entire repository at a point in time, identified by a unique SHA-1 hash.
It includes metadata like author, date, and message.

How do you create a new branch?

Show ▼

git branch <branch-name> creates a new branch pointing to the current commit.
Use git checkout -b <branch-name> to create and switch to it.

What does <code>git checkout</code> do?

Show ▼

git checkout <branch> switches to the specified branch.
For files, it restores them from the index or a commit.

🎓 Start studying Git Version Control

🎮 Study Modes Available

🔄

Flashcards

Flip to reveal

🧠

Focus Mode

Spaced repetition

Multiple Choice

Test your knowledge

⌨️

Type Answer

Active recall

📚

Learn Mode

Multi-round mastery

🎯

Match Game

Memory challenge

Related Topics in Programming

📖 Learning Resources