Re: git push [rejected] question

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

 



On Feb 18, 2008 11:33 PM, Jeff King <peff@xxxxxxxx> wrote:
> I think the user is missing one fundamental aspect of pushing: the
> behavior of "git push" without any refspecs specified is to push all
> matching refs (i.e., if you have branch refs/heads/Issue/Default and so
> does the remote, then it will attempt to push). So no matter what branch
> he is on when doing the push, it tries to push many such branches.
>
> If you want to push just the current branch, try:
>
>   git push origin HEAD

git-push(1) is a bit confusing I think:

  "Note: If no explicit refspec is found, (that is neither on the command line
  nor in any Push line of the corresponding remotes file---see below), then all
  the heads that exist both on the local side and on the remote side are
  updated."

is clear enough, but then:

  "--all Instead of naming each ref to push, specifies that all refs under
  $GIT_DIR/refs/heads/ be pushed."

So what is '--all' needed for then?

It seems like the default should be to push just the current branch
... this would correspond to what a user of git pull expects (even
though the converse of git-push is really git-fetch, for a new user,
that might not be entirely clear).

j.
-
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]

  Powered by Linux