Module 4 Flashcards

1
Q

What are other names for Working Directory?

A

Current Working Directory (CWD) and Working tree.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What Parse means?

A

To break something up into its parts and analyze it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Hash?

A

An operation that converts one value to another. It is usually used to mask data with different data.

Ex: The original file name could be orangepants.docx and the hash could be absdfmoijgfsdnsadf. Both would point to the file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the working directory in the following file path?: C:\Windows\Users\code.txt

A

Users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which one of the following terms means something different than the rest?
1. Working Directory
2. Staging area.
3. CWD
4. Current Directory

A

Staging Area

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or false?: Git is case sensitive.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What “ls” does in bash?

A

List the files in the current directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What -a does in bash?

A

Apply to all.

Ex: ls -a would list all files including hidden ones.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What “git status” does?

A

Show in which branch you are and what is to be commited.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What git commit -m “Added new text file” does?

A

Commit what was prepared to be commited and anex the message in quotations to the commit. -m is short for message.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What echo ‘This is my text file’ > file.txt does?

A

Create a text file int the current directory with the text in quotations as content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What “git add file.txt” does?

A

Stage file.txt to be commited. The add command stages and track untracked files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What “git log” does?

A

Log the commit hash, author, data, and message for every commit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What “add .” does?

A

Apply the add command to all files in the directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What “mkdir myCodeFiles” does?

A

Create a directory called myCodeFiles.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What “mv file2.txt myCodeFiles” does?

A

Move the file file2.txt to the myCodeFiles directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What “mv file2.txt myCodeFile.txt” does?

A

Rename file2.txt to myCodeFile.txt

17
Q

In which directory you have to be to commit?

A

Main directory of repository.

18
Q

What is staging?

A

To mark a file to be commited.

19
Q

What is an untracked file?

A

Files that git “doesn’t know about”. Files not saved in your working directory and are not in your staging area.

20
Q

What “git init MyRepository” does?

A

Initialize an empty Git repository in the current directory.

21
Q

What git branch myFirstBranch does?

A

Create a branch called myFirstBranch

22
Q

What git branch does?

A

List out the branchs for the current repository.

23
Q

What git checkout myFirstBranch does?

A

Switch to the myFirstBranch branch.

23
What git branch -d testBranch does?
Delete the branch called testBranch (cannot be inside of it)
24
What git checkout ff1174
Switch to a commit that the hash starts with ff1174
25
What detached HEAD means?
That we are no longer in a up to date on the branch timeline.
26
What git switch - does?
Get back to the up to date timeline in the branch.
27
What git merge myFirstBranch does?
Merges the branch you are to the myFirstBranch.
28
What cat file.txt does?
Prints out the content of a text file.
29
What is a Fork?
A copy of a repository.
30
What git clone https://github.com/Todeschinidev/developers.git does?
Create a local repository called developers and copy the online repository using the url.
31
What git diff does?
Shows the changes not commited in a branch.
32
What does the git clone command do?
Clone a repository into a new directory
33
How do you download a project from GitHub onto your local hard drive?
Clone the repository
34
What is the format of GitHub README?
.md, which stands for markdown.
35
What are good elements for a README?
Titles - Names of important sections within the README Introduction - The project's aim Technologies - List of languages used Launch - Version of languages used for reproducibility
36
How should you Title the README?
It should clearly explain what the repository is about and be the name of the project and typically uses a heading tag. In markdown a hashtag is used to make a heading. It may also include titles of certain project sections as well.
37
How should you do the Introduction/Summary in a README?
It should not be too long, about two or three sentences will do for a small project.
38
How should you do the Technologies in a README?
This section explains which languages were used in the project, as well as the version of the language that was used.
39
True or False?: The mv command can only be used to rename files.
False.
40
What does the git add command do?
Add file contents to the staging area