Challenge - 5 Problems
Git Init Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of
git init in a new directory?You run
git init inside an empty folder. What message does Git show?Git
git initAttempts:
2 left
💡 Hint
Think about what Git says when it creates a new repository folder.
✗ Incorrect
When you run
git init in a new folder, Git creates a hidden .git folder and confirms with the message 'Initialized empty Git repository in ...'.🧠 Conceptual
intermediate1:30remaining
What does
git init actually do?Choose the correct description of what
git init does when run in a folder.Attempts:
2 left
💡 Hint
Think about what Git needs to track changes locally.
✗ Incorrect
git init sets up a new Git repository by creating a hidden .git folder that stores all version control data.❓ Troubleshoot
advanced2:00remaining
Why does
git init fail with 'Permission denied'?You try to run
What is the most likely cause?
git init in a folder but get this error: fatal: could not create work tree dir 'folder': Permission deniedWhat is the most likely cause?
Attempts:
2 left
💡 Hint
Think about what 'Permission denied' means in file systems.
✗ Incorrect
The error means your user account cannot write or create files in the folder. You need proper permissions to initialize a Git repo.
🔀 Workflow
advanced2:00remaining
What is the correct sequence to create and start tracking files with Git?
You want to start a new project folder and track files with Git. Which sequence of commands is correct?
Attempts:
2 left
💡 Hint
You must create and enter the folder before initializing Git there.
✗ Incorrect
You first create and enter the folder, then run
git init inside it, add files, and commit.✅ Best Practice
expert2:30remaining
Which practice is best when initializing a Git repository for a new project?
You start a new project and run
git init. What should you do next to avoid committing unwanted files?Attempts:
2 left
💡 Hint
Think about how to prevent temporary or sensitive files from being tracked.
✗ Incorrect
Creating a .gitignore file early helps exclude files like logs, build outputs, or secrets from being added accidentally.