Google IT Automation with Python Professional Certificate β’ STUDY MODE
ADVANCED GIT INTERACTION
QUESTION 1 OF 7
What is the gitignore file?
Awesome! The gitignore file is a text file that tells Git which files or folders to ignore in a project.
A
A file containing a list of commands that Git will ignore.
B
A file the user is intended to ignore.
C
A file listing uncommitted changes.
D
A file containing a list of files or filename patterns for Git to skip for the current repo.Correct Answer
QUESTION 2 OF 7
What kind of file will the command git commit -a not commit?
Right on! Files that are new and untracked will not be committed before being added.
A
Tracked files
B
New filesCorrect Answer
C
Old files
D
Staged files
QUESTION 3 OF 7
What does HEAD represent in Git?
Great work! In all cases, HEAD is used to indicate what the currently checked-out snapshot is.
A
The subject line of a commit message
B
The top portion of a commit
C
The currently checked-out snapshot of your projectCorrect Answer
D
The first commit of your project
QUESTION 4 OF 7
If we want to show some stats about the changes in a commit, like which files were changed and how many lines were added or removed, what flag should we add to git log?
Excellent! This will cause git log to show some stats about the changes in the commit, like which files were changed and how many lines were added or removed.
A
--statCorrect Answer
B
--patch
C
-2
D
--pretty
QUESTION 5 OF 7
If we)re making a small change and want to skip the staging step, which two flags do we need to add to the git commit command? Check all that apply.
Right on! The -m flag allows us to directly add the commit message to the command.
Awesome! The -a flag lets us add and commit in the same step
A
-mCorrect Answer
B
-t
C
-l
D
-aCorrect Answer
QUESTION 6 OF 7
If we want to see a specific commit, which command would we use along with the commit ID?
You nailed it! Taking the commit ID, git show will show information about the commit and its associated patch.
A
git log --stat
B
git showCorrect Answer
C
git log -p
D
git commit -am
QUESTION 7 OF 7
If we need to delete a file from our repository, we'll need to run a command to delete the file and then stage and commit the change. Which command would we use to delete the file?
Woohoo! This command removes files from the working tree and from the index.
A
git rmCorrect Answer
B
git mv
C
git diff
D
git del
Ready to test your recall?
What is the gitignore file?
Awesome! The gitignore file is a text file that tells Git which files or folders to ignore in a project.
A
A file containing a list of commands that Git will ignore.
B
A file the user is intended to ignore.
C
A file listing uncommitted changes.
D
A file containing a list of files or filename patterns for Git to skip for the current repo.