Quiz
Answer the following questions:
- What does
git log
do in Git?- Deletes old commits
- Shows the history of commits
- Changes the latest commit
- Creates a new branch
Answer: B. Shows the history of commits.
- True or false: The
git reflog
command can be used to see a list of actions (such as commits and merges) made in a repository.- True
- False
Answer: A. True.
-
git
________ is a tool that’s used to find the commit that introduced a bug by automatically testing commits.Answer:
bisect
. - What is the purpose of reverting a commit in Git?
Answer: Reverting a commit is used to undo changes made by a specific commit, bringing the project back to its previous state without altering the project’s history.
- What does the
git diff
command show?- Differences between branches
- Differences between commits
- Current changes in your working directory
- All of the above
Answer: D. All of the above.
- True or false: Once a commit is reverted, it is completely removed from the project’...