Git · Junior · Question 40 of 75

What does git init do?

Explanation

It creates the .git directory with an empty history. Files in the folder stay untracked until you add and commit them.

Further reading

Problem with a question

Git · Junior · question 40

Test yourself

Take the Git · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz