Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pushing back to github repository

Tags:

git

github

push

I cloned one of my github repository to my office desktop machine using the following command

git clone git://github.com/indiajoe/MyRepo.git

After making some changes, and commiting it, i wasn't able to push back the changes to repository using the command,

git push -u orgin master

Following was the error message.

fatal: 'orgin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

I tried to re-enter the address, as shown below.

git remote rm origin
git remote add origin https://github.com/indiajoe/MyRepo.git

Even after this, i was getting the same error. Output of my git remote -v is

origin  https://github.com/indiajoe/MyRepo.git (fetch)
origin  https://github.com/indiajoe/MyRepo.git (push)

What could be going wrong here?

PS: While cloning I wasn't able to do via https by the following command

git clone https://github.com/indiajoe/MyRepo.git

But it cloned without any issue with the command,

git clone git://github.com/indiajoe/MyRepo.git

I don't know, why this happened. but could this be a related issue?

like image 644
indiajoe Avatar asked Jul 05 '13 18:07

indiajoe


People also ask

What does pushing to GitHub mean?

The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches.

How do I push changes to my repository?

To push changes from the current branch press Ctrl+Shift+K or choose Git | Push from the main menu. To push changes from any local branch that has a remote, select this branch in the Branches popup and choose Push from the list of actions.


1 Answers

git push -u `orgin` `master`

That shouldn't work: it is 'origin', not 'orgin' ;)

So, by default, this should work:

git push -u origin master

(as I detail in "Why do I need to explicitly push a new branch?")

like image 176
VonC Avatar answered Oct 14 '22 06:10

VonC