[Sugar-devel] initial commit to git?

Martin Dengler martin at martindengler.com
Sun Jun 6 21:31:23 EDT 2010


On Sun, Jun 06, 2010 at 07:16:55PM -0400, Art Hunkins wrote:
> $ git push  gitorious at git.sugarlabs.org:sun-moon-music/mainline.git
[...]
> No refs in common and none specified; doing nothing.
> Perhaps you should specify a branch such as 'master'.

> The line:
> Perhaps you should specify a branch such as 'master'.
> keeps showing up in these dialogs.

Git is telling you exactly what to do, and this time it's right.

try

 git push origin master

(like you have tried before, when origin wasn't set to gitorious) or

 git push gitorious at git.sugarlabs.org:sun-moon-music/mainline.git master

(like you almost tried before but with the fatally omitted "master")

> To my knowledge there is *nothing but* a "master."

There can be many.  "master" is a ref.  A ref names a commit object
(roughly).  You push a ref to another repo's ref.  "git push origin
master" means:

take the commit object named by (among other things) the ref "master"
in the current directory's repo and transfer (push) it to the remote
(other) repo named by "origin" (this is defined by you in the config
file), and change the ref "master" (this is defaulted for you in your
command) in that remote repo to point to that commit, and transfer any
commits leading up to my local master that are necessary to that
remote repo, too.

> Further ideas most appreciated.

It has helped me to re-read the git tutorials I have found useful in
the past when I have to come to grips with something in git that's
giving me trouble.  It usually means I haven't understood something
fully.

> Art Hunkins

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100607/d2c60727/attachment.pgp 


More information about the Sugar-devel mailing list