Development Tools

Tlaleng Ramoroke
Tlaleng Ramoroke
1,627 Points

why do i get fatal: Not a git repository

git remote add origin
fatal: Not a git repository (or any parent up to mount point /home/treehouse/workspace)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Hi when first adding to a new repository ensure that you are in right local directory when initialising your git, this can be done by using the cd command plus the local address. It looks like you haven't actually initialise git in the directory.

Finally, when I clicked the link it seems as if the repository doesn't actually exist on GitHub, first create the repo then get the remote repository URL.

Here's a simple step by step process below

  1. Create your online repository on GitHub (Make note of the URL)
  2. In your local directory containing the files you wish to transfer type git init to initialise check using git status
  3. Use git add . with the full stop to prepare all files for transfer
  4. To finally commit your files use git commit -m "Any description"
  5. In the Command prompt, type git remote add origin "Copy the remote repo URL here" minus the quotations
  6. You can check if it is the correct url using git remote -v
  7. Finally to push your commit use git push origin master

Hope this helps!

Tlaleng Ramoroke
Tlaleng Ramoroke
1,627 Points

yes i got it dome have missed a stage when following up.appreciate it.