Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Tlaleng Ramoroke
Tlaleng Ramoroke
1,627 Points

why do i get fatal: Not a git repository

git remote add origin https://github.com/tlale/medals.git
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).

Tlaleng Ramoroke
Tlaleng Ramoroke
1,627 Points

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

1 Answer

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!