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
Q

What git branch -d testBranch does?

A

Delete the branch called testBranch (cannot be inside of it)

24
Q

What git checkout ff1174

A

Switch to a commit that the hash starts with ff1174

25
Q

What detached HEAD means?

A

That we are no longer in a up to date on the branch timeline.

26
Q

What git switch - does?

A

Get back to the up to date timeline in the branch.

27
Q

What git merge myFirstBranch does?

A

Merges the branch you are to the myFirstBranch.

28
Q

What cat file.txt does?

A

Prints out the content of a text file.

29
Q

What is a Fork?

A

A copy of a repository.

30
Q

What git clone https://github.com/Todeschinidev/developers.git does?

A

Create a local repository called developers and copy the online repository using the url.

31
Q

What git diff does?

A

Shows the changes not commited in a branch.

32
Q

What does the git clone command do?

A

Clone a repository into a new directory

33
Q

How do you download a project from GitHub onto your local hard drive?

A

Clone the repository

34
Q

What is the format of GitHub README?

A

.md, which stands for markdown.

35
Q

What are good elements for a README?

A

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
Q

How should you Title the README?

A

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
Q

How should you do the Introduction/Summary in a README?

A

It should not be too long, about two or three sentences will do for a small project.

38
Q

How should you do the Technologies in a README?

A

This section explains which languages were used in the project, as well as the version of the language that was used.

39
Q

True or False?: The mv command can only be used to rename files.

A

False.

40
Q

What does the git add command do?

A

Add file contents to the staging area