Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Repository Maintenance: gc and maintenance

Create a disposable repository with several commits. Record its object-storage report with `git count-objects -v -H`. Run `git gc --no-prune`, then inspect the storage report again. Next run `git maintenance run --task=gc` and `git maintenance run --auto`. Create a disposable configuration file, register the repository with `git maintenance register --config-file`, verify that the repository was recorded in that file, and unregister it. Finally run `git fsck --full` and explain why a successful maintenance run is not an integrity certificate.

Advanced ~6 min read

Challenge 1

Complete the Git command to run repository maintenance.

bash Your answer
git  --no-prune

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to run repository maintenance.

bash Your answer
git 

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the Git command to run repository maintenance.

bash Your answer
git  --auto

Press Ctrl⌘Enter to check your answer

Challenge 4

Complete the Git command to run repository maintenance.

bash Your answer
git  --cruft

Press Ctrl⌘Enter to check your answer