push.default and "git push"

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

 



Hi,

I've been reading the documentation on git push lately, and there are
a couple of places I don't quite understand. From git-config:

> matching - push all branches having the same name on both ends. This makes the repository you are pushing to remember the set of branches that will be pushed out (e.g. if you always push maint and master there and no other branches, the repository you push to will have these two branches, and your local maint and master will be pushed there).

(1) What does "remember" exactly mean? Is this a round-about way to
say that when you push a branch it gets created? But no, it won't push
a branch, unless it exists remotely.

Actually I created a script to examine how these modes work:

https://gist.github.com/x-yuri/20f24f628db1bcbf272c055b33c18889

And from git-push:

> When the command line does not specify where to push with the <repository> argument, branch.*.remote configuration for the current branch is consulted to determine where to push. If the configuration is missing, it defaults to origin.

I've found that if there's no remote named "origin" it pushes to the
first remote. Or so it seems:

https://gist.github.com/x-yuri/888261d182fdab92040760138ea10a22

(2) I wonder if the documentation should be amended...

Regards,
Yuri




[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