A repository contains two tracked files, a.txt and b.txt, and the working tree matches the last commit exactly. You carry out the steps below in order. After each step, enter how many files git status would list under Changes to be committed (Staged), under Changes not staged for commit (Not staged), and under Untracked files (Untracked).
Unlock full course notes by signing up
Keep a generated file locally while stopping tracking
A generated file named debug.log is already tracked and committed. Your working tree and staging area have no pending changes. You want future commits to omit this file while keeping its local copy on disk. Complete the procedure using the long command option and the standard project ignore filename.
Run git rm ________ -- debug.log from the project root.
Add a line containing /debug.log to the project-root file named ________.
Commits in the log after amend and revert
In a repository whose working tree is clean, git log --oneline lists 14 commits. You then do the following, in order:
Edit app.js, stage it with git add, and run git commit.
Immediately run git commit again with a new message, without editing or staging anything.
Count line differences after partially reversing staged edits
A tracked text file, notes.txt, contains 60 distinct lines in the current commit, identified by HEAD. Initially, its staged and working versions match that commit.
You make these changes in order:
Delete original line 10, append eight new lines, and run git add -- notes.txt.