Git init- where does the project name come from?


#1

Hopefully this isn't a stupid question, but in the first exercise, I type 'git init' and the output shows the project as 'sorcerers-code'. Where did this come from? Then the next exercise,
git status seemed to magically know we were talking about the sorcerers-code project also. Am I missing something? Thanks


#2

Not stupid question at all. Have you done the Command Line course yet? If you ask for your working directory you'll see that you are in the sorcerers-code directory -- I believe that git init uses this information:

$ pwd   
/home/ccuser/workspace/sorcerers-code

#3

Someone at codecademy made this directory, when you work on git on your own computer this directory can be called anything, and you can initialize the project with git init.

Git doesn't know you work on the sorcerers, it just creates the .git directory in the current working directory. (pwd, as albions explained)


#4

Ah, okay... it wasn't clear that it uses the directory name as the project name. Thanks for your help!!