Master Git Version Control with 51 free flashcards. Study using spaced repetition and focus mode for effective learning in Programming.
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.
Use the command git init in the root directory of your project.
This creates a hidden .git subdirectory containing all repository data.
git clone <url> creates a copy of an existing remote repository on your local machine.
It includes all branches, tags, and history.
git add <file> stages changes in the working directory for the next commit.
You can stage all changes with git add . or specific files.
git commit -m "message" saves the staged changes to the local repository as a snapshot.
The commit message should describe the changes concisely.
git status shows the state of the working directory and staging area.
It lists modified, untracked, and staged files.
git log displays the commit history, including commit hashes, authors, dates, and messages.
Use options like --oneline or --graph for compact views.
The working directory is the filesystem where you edit files and where Git tracks changes.
It contains files checked out from the repository.
The staging area holds a snapshot of changes ready to be committed.
Changes must be added here with git add before committing.
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.
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.
git checkout <branch> switches to the specified branch.
For files, it restores them from the index or a commit.
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