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 Git Basics Working With Remote Repositories Pushing and Pulling

Owa Aquino
Owa Aquino
19,277 Points

Fatal error is displayed when pushing changes in from my Master branch to the remote repository.


I'm having an error when pushing to my remote repository saying

fatal: 'clone_repo' does not appear to be a git repository
fata: The remote end hung up unexpectedly

If I check on to may master using command "git remote" it shows my created remote repository. I dunno whats wrong I'm doing though.


1 Answer

I had a similar problem, it had turned out my remote was set in the wrong directory.

in the video he used this command to add the remote:

git remote add our_clone ~/our_clone_project/ 

This is fine if you are working in your home directory. I am using Git Bash for windows, and set my repository in a project directory instead of my home directory, so it gave me the error when I tried to push.

I fixed it with mine by removing the remote:

git remote remove our_clone

Then re-added it:

git remote add our_clone ../our_cloneproject/

Adding ../ before the name of the cloned repository let git know that it was in the directory above the current directory I was pushing from.

Hope this helps!