Embercode
✕
Git and GitHubQuick quiz

Diff, history and review

9 questions. Covers Code review on GitHub.

Questions 1 to 5 of 9

  1. 1. What does this command show? ``bash git diff --staged ``
  2. 2. What does this command do? ``bash git restore --staged -p greeting.py ``
  3. 3. The diff below changes old_greet.py into new_greet.py. What does python3 new_greet.py print? ``diff @@ -1,5 +1,5 @@ def greet(name): - return "Hello " + name + return "Hello, " + name print(greet("Asha")) ``
  4. 4. Is this statement true? After you run git add greeting.py, plain git diff shows the change you made to greeting.py.
  5. 5. What is the short option that makes git show leave out the diff and print only the commit details?

    Type your answer.

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.