-1

I'm new to programming and I'm having trouble understanding git init command. For example, when I type git init on my terminal I get a return like this:

Initialized empty Git repository in /Users/JohnDoe/Documents/.git/

What is this exactly? Am I creating a new folder for git projects? Am I doing nothing? Or am I turning my entire Documents directory into a repository?

Pankwood
  • 1,799
  • 5
  • 24
  • 43
PhiAlpha
  • 7
  • 1
  • 4

2 Answers2

1

You created a local repository. You can type git status and you should see '(home)' to verify you have a local repository.

One of the things to understand about git is that you can have a local repository and a remote repository. The next step would be to add files to your local repository. You can use the command git add -all to add all the files in your directory.

Pankwood
  • 1,799
  • 5
  • 24
  • 43
JOlivarez
  • 23
  • 7
0

I hope this helps you git it.

Transform the current directory into a Git repository. This adds a .git subdirectory to the current directory and makes it possible to start recording revisions of the project.

https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init