How do I use "git init" to initialize a new folder?

2.7k views Asked by At

I want to initialize a folder for a new HTML project. The folder is called HTML. I want to create ".git"(repository?) in that folder. Here is what I keep getting after I put "git init" after my folder name:

dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk 
Referenced from: /usr/local/git/bin/git 
Expected in: /usr/lib/libSystem.B.dylib 

dyld: Symbol not found: ___strlcpy_chk 
Referenced from: /usr/local/git/bin/git 
Expected in: /usr/lib/libSystem.B.dylib 

What does this mean? Is there another command I should use? I need to initialize the folder so that .git comes up.

I've tried to fix this on my own by using different folders and nothing is getting created under "git init". Git is properly installed on my Mac.

3

There are 3 answers

4
Konstantinos On

Please check this thread: git + mountain lion + dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk

It is for a very similar issue on Mac. What is your Mac OS X version? Did you ever used/configured git on this Mac before? Can you run commands like git --version or git config -l ?

0
vernon On

Good introduction here: http://shaun.boyblack.co.za/blog/2009/03/14/getting-started-with-git-on-mac-os-x/

git init (without additional words) creates a new git repo in the current working directory. Navigate to the root folder of your project and use it.

0
Krishna Tandon On

Using the following steps will help you to use "git init"

  1. https://git-scm.com/book/en/v2/Getting-Started-Installing-Git Based on your OS, use the above link to install git on your machine.

  2. After the installation is successful, open terminal. Run git on the terminal and the result will appear as followsInstalled git successfully

  3. After this, run git --version to check the git version. Note, there is a space between git and --version.

  4. Checking GIT version

  5. Now, create a folder where git repo is to be created.

  6. After selecting that folder, run, "git init"
  7. Please check this link for further steps. Git commands not working in Mac terminal: "dyld: Symbol not found: ___strlcpy_chk" error