From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129712 invoked by alias); 13 Jan 2020 00:38:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 129702 invoked by uid 89); 13 Jan 2020 00:38:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=restored, H*f:sk:B6AF2DF, preference, H*MI:sk:B6AF2DF X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Jan 2020 00:38:06 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 00D0bvUp003071; Sun, 12 Jan 2020 18:37:58 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 00D0bvqK003070; Sun, 12 Jan 2020 18:37:57 -0600 Date: Mon, 13 Jan 2020 02:15:00 -0000 From: Segher Boessenkool To: Iain Sandoe Cc: "Richard Earnshaw (lists)" , "gcc-patches@gcc.gnu.org" , Joseph Myers Subject: Re: [wwwdocs] Git transition - how to access private user and vendor branches Message-ID: <20200113003756.GF3191@gate.crashing.org> References: <01477bd3-5733-8223-8a38-01fd96fafece@arm.com> <20200111154130.GD3191@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00684.txt.bz2 On Sun, Jan 12, 2020 at 01:31:13PM +0000, Iain Sandoe wrote: > Segher Boessenkool wrote: > > Why would people want to name their local branches "me/thing" instead > > of just "thing", btw? > > it’s a way of making things distinct and allows the push rule to be present for them > but absent for more dangerous pushes. That's a weird setting imo. Potentially destroying your own work *is* dangerous :-) Pretty much anything you mess up locally in Git can be easily restored. Restoring remote branches can be much harder. To start with, this requires knowing *what* to restore, which can require direct access to the remote repository, or its backups. So doing an unexpected non-ff push is probably not a good idea. You can also add a "+" manually when you want to overwrite the remote branch, or configure your setup to always do that for certain branches. It all depends on personal preference and work habits, of course. But I think it isn't the best idea to recommend people take up dangerous habits :-) > So if one renames origin to something else > e.g. fsf or upstream, and there are no automatic push rules, it’s one more small > protection against an accidental push? If you haven't configured push rules for your remote, you get what you have in "push.default" for that remote. Since Git 2.0 the default has been "push.default = simple", and no non-ff pushes are allowed by default anyway? I guess it makes some sense to group together locally the branches you have in users/ on our shared server. But then "me/" is not a great name :-) Segher