128 lines
4.1 KiB
Markdown
128 lines
4.1 KiB
Markdown
---
|
||
title: Git
|
||
TARGET DECK: Obsidian::STEM
|
||
FILE TAGS: git
|
||
tags:
|
||
- git
|
||
---
|
||
|
||
## Overview
|
||
|
||
Files in the working directory are in one of two states:
|
||
|
||
* **Tracked** - files that were in the last snapshot or newly staged.
|
||
* **Untracked** - files in the working directory that aren't tracked.
|
||
|
||
Tracked files may be unmodified, modified, or staged.
|
||
|
||
%%ANKI
|
||
Basic
|
||
Files in the working directory are in one of what two states?
|
||
Back: Tracked and untracked.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450631-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Basic
|
||
What is a tracked file?
|
||
Back: A file that is staged or exists in the latest snapshot.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450637-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Basic
|
||
What is an untracked file?
|
||
Back: A file that is neither staged nor exists in the latest snapshot.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450640-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Basic
|
||
What three statuses can a tracked file be in?
|
||
Back: Unmodified, modified, and staged.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450644-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Basic
|
||
What does it mean for a tracked file to be unmodified?
|
||
Back: The version in the working directory is the same as in the last snapshot.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450647-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Basic
|
||
What does it mean for a tracked file to be modified?
|
||
Back: The version in the working directory is different from that in the last snapshot.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450650-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Basic
|
||
What does it mean for a tracked file to be staged?
|
||
Back: The version in the working directory has been added to the index.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450653-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Basic
|
||
How do you convert an untracked file to a tracked file?
|
||
Back: Stage the file.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450657-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Basic
|
||
What operation converts an unmodified file to a modified file?
|
||
Back: Editing the file.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450660-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Basic
|
||
You can convert an untracked file to a tracked file with what status?
|
||
Back: Staged.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450664-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Cloze
|
||
An {1:unmodified} tracked file becomes a {2:modified} tracked file after {2:editing} the file.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450668-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Cloze
|
||
A {1:modified} tracked file becomes a {2:staged} tracked file after {2:staging} the file.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450673-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Cloze
|
||
A {1:staged} tracked file becomes an {2:unmodified} tracked file after {2:committing}.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450678-->
|
||
END%%
|
||
|
||
%%ANKI
|
||
Cloze
|
||
An untracked file becomes a {1:staged} tracked file after {1:adding} the file.
|
||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||
<!--ID: 1714478450683-->
|
||
END%%
|
||
|
||
## Bibliography
|
||
|
||
* Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014). |