Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I fix missing git remote details?

Tags:

git

repository

Some repository clones I have allow me to do this:

% git pull
% git push

But other repositories require me to type:

% git pull origin master
% git push origin master

I think I am missing something in the latter case - does anyone know what is (not) going on here? I am using the latest git version, just obviously not using it well.

like image 912
Paul Beckingham Avatar asked Nov 23 '08 02:11

Paul Beckingham


1 Answers

If you cd into your repository directory and then open up your .git/config file in an editor.

Append this to the end of the file:

[branch "master"]
     remote = origin
     merge = refs/heads/master

This is pretty much just an alias so git knows by default to pull from origin master.

like image 103
Brian Gianforcaro Avatar answered Sep 28 '22 01:09

Brian Gianforcaro