Last Updated: January 3, 2026
30 quizzes
Stage the removal of a tracked file so that its deletion is included in the next commit
git old_config.jsonClick an option to fill the blank:
Force removal of a modified tracked file and stage its deletion
git rm - temp.logClick an option to fill the blank:
Remove a directory and all tracked files under it in one command
git rm - assets/Click an option to fill the blank:
Rename a tracked file within the repository while staging the change
git README.txt README.mdClick an option to fill the blank:
Mark a script as executable so collaborators can run it as a program
git update-index --chmod=+ scripts/deploy.shClick an option to fill the blank:
What does git rm do by default for a tracked file?
You accidentally deleted a tracked file using the OS file manager. What is a typical next step before committing?
Why is git mv generally preferred over using the OS move command followed by git add and git rm?
Which file permission change is Git able to track natively on most systems?
A script lost its executable bit in the repository. What is a Git-focused way to make the change visible in history?
Order the steps to delete an obsolete tracked file and record the change
Drag and drop to reorder, or use the arrows.
Order the steps to move a tracked file into a new subdirectory and share the change
Drag and drop to reorder, or use the arrows.
Order the steps to stop tracking a configuration file but keep it locally
Drag and drop to reorder, or use the arrows.
Order the steps to make a deployment script executable for all collaborators using Git
Drag and drop to reorder, or use the arrows.
You just ran git rm unused.txt on a tracked file. What will git status show for that file?
1git status --shortYou ran git mv src/app.js src/main.js. What will git status --short show for that change?
1git status --shortYou made a file executable with git update-index --chmod=+x tools/build.sh. How will git status --short show this change?
1git status --shortA tracked file was deleted using the OS, but you have not staged anything yet. How will it appear in short status?
1git status --shortIdentify the incorrect command in this workflow that tries to rename a file and commit the change
Click on the line(s) that contain the bug.
git mv index.html app.htmlgit add index.htmlgit commit -m "Rename index to app"git push origin mainIdentify the incorrect command in this attempt to remove a directory and its tracked contents
Click on the line(s) that contain the bug.
git rm src/rm -rf src/git commit -m "Remove src directory"Identify the incorrect command in this attempt to make a script executable via Git
Click on the line(s) that contain the bug.
chmod +x scripts/run.shgit add scripts/run.shgit commit -m "Make script executable"git push origin mainMatch each Git command with its primary effect on files
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match each permission representation with its meaning
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match each scenario with the most appropriate Git command
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Complete the commands to remove a tracked build directory but keep it locally ignored going forward
echo "build/" >> .gitignoregit rm -- build/git -m "Stop tracking build directory"Click an option to fill blank 1:
Complete the commands to move a script and mark it executable in Git
git scripts/run.sh tools/run.shgit update-index --chmod= tools/run.shClick an option to fill blank 1:
Complete the commands to delete a tracked file and then verify it is staged for removal
git rm notes.txtgit --Click an option to fill blank 1:
Select the line that shows a file staged for deletion after using git rm
Click on the line to select.
M src/main.jsD OLD_README.mdD docs/legacy.mdD logs/old.logSelect the line indicating a renamed file after using git mv
Click on the line to select.
M src/config.jsR src/app.js -> src/main.jsA src/new-feature.jsSelect the line where only the executable bit of a script was changed
Click on the line to select.
M README.mdM scripts/deploy.shA scripts/setup.sh