Categories
Tutorials

Git/Github Push tip

I love git and it’s counter part github, but whenever comes to uploading my local project to online, I always stuck at once place, which is pushing. You can think of pushing as uploading and in git terms we say pull instead of downloading.

Git and Github combo is so good that I have started to use them in every project. After setting up files locally and committing it for the first time, the stage is all set to push it to github, but every now and then, this error bugs me every time.

fatal: Could not read from remote repository.

When ever you create new repository at github give you some command to push existing repository i.e

    git remote add origin https://github.com/username/reponame.git
git push origin remote

Solution

There is no rocket science involved in solving this problem. The problem lies with the word origin, it just a convention not a part of a command. You can name it any thing in my case I just replaced the above commands with myorgin and my problem was resolved.

    git remote add myorigin https://github.com/username/reponame.git
git push myorigin remote

I can’t promise the internal work around, but just replacing the word origin did it for me. If you guyz have some better and clever explanation, kindly leave that in the comments.

2 replies on “Git/Github Push tip”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.