From: Linus Torvalds Date: Thu, 12 Jan 2006 18:10:31 GMT Subject: Re: [RFD] what should "git push remote.host:path" do? Message-ID: In-Reply-To: <7vslrtq05h.fsf@assigned-by-dhcp.cox.net> On Thu, 12 Jan 2006, Junio C Hamano wrote: > > Nevertheless, exposing the default behaviour of "git send-pack" > to "git push" was probably a mistake. I'd propose to require at > least one refspec to be specified, either on the command line or > via $GIT_DIR/remotes mechanism. So my answer to the "Subject: " > line question is "Barf". Well, I don't have objections, but from ym usage schenario, I'd at least then want flags for "all tags" (--tags - like "pull") and "all branches" (--all). Having to list all tags/branches is slightly painful. I currently push out all my tags with ./push-all $(cd .git/refs ; find -type f tags) which works but isn't exactly user-friendly ("push-all" is just a script that uses "git push" to push to multiple repositories). > Unlike pull that can happen pretty much promiscuously, people > will push into the same set of a limited number of remote > repositories repeatedly over the life of the project, so it is > reasonable to assume they would want to keep a $GIT_DIR/remotes/ > entry for those repositories to save typing. Then always > requiring one or more refspecs for push is not too much to ask > for. Well, especially if you want to use "git push" to basically back up your own repo, you do want the "--all" flag. Otherwise you will then forget to add a branch name to every remotes file whenyou create a new branch. Linus