message on no-args push to an empty repo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

When someone is doing the *first* push to an empty remote repo, and
they try to use the no-args "git push", they get this:

> No refs in common and none specified; doing nothing.
> Perhaps you should specify a branch such as 'master'.
> fatal: The remote end hung up unexpectedly
> error: failed to push some refs to 'git@gitsrv:testsite.git'

This is a fairly clear message, except that by only mentioning the
branch name, and not the remote name, it perhaps confuses people into
doing this:

> $ git push master
>
> fatal: 'master' does not appear to be a git repository
> fatal: The remote end hung up unexpectedly

The correct answer of course is "git push origin master", and yes I
realise they should read the git-push manpage...

Can we think of a possible wording change to that message to help this
situation?  For example, would it be safe to assume the remote would
always (in such cases) be "origin" and say:

    Perhaps you should specify the remote and the branch explicitly,
like 'git push origin master'

Regards,

Sitaram
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]