Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Removing and Moving Tracked Files

Build a disposable repository containing `keep.txt`, `remove-me.txt`, and `notes.txt`. Commit them. Then: (1) remove `remove-me.txt` with `git rm`; (2) rename `notes.txt` to `documentation.txt` with `git mv`; (3) verify both changes are staged; (4) confirm `keep.txt` is still tracked and present; (5) commit the changes; and (6) verify the final commit contains the new path and no longer contains the removed path.

Beginner ~6 min read

Challenge 1

Complete the Git command to remove tracked paths.

bash Your answer
git 

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to use the `git mv` operation.

bash Your answer
git 

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the Git command to create the repository.

bash Your answer
git  --initial-branch=main

Press Ctrl⌘Enter to check your answer

Challenge 4

Complete the Git command to read or set Git configuration.

bash Your answer
git  user.name "Foxipa Git Test"

Press Ctrl⌘Enter to check your answer