3. Initialize your repo


#1

Hi, im trying to navigate to my site's directory, and then do git init but i cant, can somebody help me.

I have a screen shot on how i was doing it, please someone help me?

Syamel


#2

Please try opening a new terminal and git init afresh before you cd. You could see it worked at first.

Try this!


#3

Hi, thanks for replaying to me problem. I tried, open a new bash tab and straight away i tried to navigate to me directory but it wont let me do it. See screen shot. what am i doing wrong?


#4

No! I suggested to git init before cd. I liken it to a car. You need to start before you can even change the car's direction. So, initialize first before that.


#5

still wont work....


#6

The repository you are targeting to cd doesn't seem right.

Please ensure the directory is correct.

Then, I need to apologise, pls do the following steps in a new terminal. change startkekyll to your target.

`

  • cd startjekyll

  • git init

`


#7

I'm not sure why you are having trouble with this. Please try again.

$ pwd                                                                                             
/home/ccuser/workspace/daw                                                                        
$ ls -la                                                                                          
total 12                                                                                          
drwxr-xr-x 3 ccuser ccuser 4096 Jun  2 08:47 .                                                    
drwxr-xr-x 3 ccuser ccuser 4096 Jun  2 08:47 ..                                                   
-rw-r--r-- 1 ccuser ccuser    0 Apr 25 18:05 .cc                                                  
drwxr-xr-x 8 ccuser ccuser 4096 May 25 15:12 personal-website                                     
$ cd personal-website                                                                             
$ pwd                                                                                             
/home/ccuser/workspace/daw/personal-website

#8

There was a suggestion to create a git repository immediately when entering the shell, but there should not be a git repository in the directory that you start in. (Need to find out if in the right first place first, gotta decide what to do before doing it, gotta know where we're running our commands)

You did enter a correct path to that directory, and bash moved you there. (As you can tell by that it gave no output, it is silent on success)

However, it did not trigger codecademy's checkpoint because it isn't looking at what effect your command has, it is looking at what you type. What the exercise's author expects you to do is to just specify personal-website to cd, which it will interpret as "go to that subdirectory of the current directory", it's a relative path, starting from your current position.


#9

ok this works, thank you for your help.


#10

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.