Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Ignore Files and Check Ignore

Create a disposable repository containing `src.txt`, `debug.log`, and `notes.log`. Track and commit `src.txt` and `notes.log` first. Then create a `.gitignore` containing `*.log`. Verify that already tracked `notes.log` remains tracked, while a newly created `trace.log` is ignored. Use `git check-ignore --verbose` to identify the rule responsible for `trace.log`. Finally, verify that no ignored file was deleted.

Beginner ~6 min read

Challenge 1

Complete the Git command to use the `git check-ignore` operation.

bash Your answer
git  --verbose

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to create the repository.

bash Your answer
git  --initial-branch=main

Press Ctrl⌘Enter to check your answer

Challenge 3

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

Challenge 4

Complete the Git command to read or set Git configuration.

bash Your answer
git  user.email "git-test@example.invalid"

Press Ctrl⌘Enter to check your answer