SnapCards

Computer Science: Git & Version Control

20 cards|
6 easy10 medium4 hard
computer sciencegitversion control

Essential Git commands, branching strategies, and version control concepts.

Study these flashcards with spaced repetition

Track your progress, master difficult cards, and export to Anki. Free to start.

Start Studying — Free

Flashcards in This Deck

1
easy

Which Git command initializes a new, empty repository in the current directory?

git init

2
easy

What command is used to create a local copy of an existing remote repository?

git clone

3
easy

What is the purpose of the .gitignore file in a project?

To specify intentionally untracked files that Git should ignore, such as build artifacts, logs, or sensitive environment variables.

4
easy

Which command moves changes from the working directory to the staging area (index)?

git add

5
easy

What command creates a new branch named 'dev' without switching the current working directory to it?

git branch dev

6
easy

Explain the fundamental difference between 'git push' and 'git pull'.

git push uploads local repository commits to a remote repository, while git pull fetches changes from a remote and merges them into the local branch.

7
medium

How does 'git fetch' differ from 'git pull'?

git fetch downloads objects and refs from a remote repository without modifying the local working state, whereas git pull performs a fetch followed immediately by a git merge.

8
medium

What does the 'HEAD' pointer represent in a Git repository?

HEAD is a reference to the current checked-out commit or branch tip that the working directory is currently reflecting.

9
medium

Describe a 'fast-forward' merge and when it occurs.

A fast-forward merge occurs when the target branch has no new commits since the source branch diverged, allowing Git to simply move the branch pointer forward to the source's tip.

10
medium

What is the primary function of 'git stash'?

To temporarily save (shelf) uncommitted changes in the working directory so the user can switch branches without losing work or committing incomplete code.

+10 more cards — sign up to see all

Frequently Asked Questions

How many flashcards are in this Computer Science: Git & Version Control deck?

This deck contains 20 flashcards with a mix of difficulty levels: 6 easy, 10 medium, and 4 hard cards.

Is this flashcard deck free to use?

Yes! You can study these flashcards for free with our spaced repetition system. Create a free account to track your progress and save your study history.

Can I export these flashcards to Anki?

Pro users can export any deck to Anki (.apkg format) with one click. Free users can export to CSV. Start studying for free and upgrade when you need Anki export.

What is spaced repetition?

Spaced repetition is a study technique that shows you cards at increasing intervals based on how well you know them. Cards you struggle with appear more often, while mastered cards are shown less frequently. This is proven to be one of the most effective ways to memorize information.

Related Flashcard Decks

Ready to study?

Create a free account and start studying these flashcards with spaced repetition.

Get Started — Free
Computer Science: Git & Version Control | SnapCards