git init turns a folder into a Git repository by creating a hidden .git folder.
git status shows which files are:
- Untracked: new files Git is not tracking yet.
- Modified: changed since the last commit.
- Staged: ready to be committed.
Create a repository and check its state.
✍️ 2 exercises in this lessongit init turns a folder into a Git repository by creating a hidden .git folder.
git status shows which files are:
Mastering Git Init & Status helps you write clean and reliable Git code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.
mkdir my-project
cd my-project
git init
echo "# My Project" > README.md
git status
Initialized empty Git repository in C:/my-project/.git/
On branch main
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
README.md
Check what you learned in “Git Init & Status”.
Turn the current folder into a Git repository.
git
Which command shows untracked and modified files?
Stuck on something?
Ask the community in the CodesInTech forum.
Need a developer?
Learning on your own is great — and when you need professional help, our team builds custom software, websites and mobile apps for clients worldwide.
Explore Our Services