Segher Boessenkool <seg...@kernel.crashing.org> wrote:
On Sun, Jan 12, 2020 at 01:31:13PM +0000, Iain Sandoe wrote:
Segher Boessenkool <seg...@kernel.crashing.org> 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.
(FAOD) I wasn’t suggesting to add the ‘+’ (I never set anything to force
push)
just commenting that putting one’s own work in a separate namespace isn’t
a bad plan.
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 :-)
no, I usually duplicate the ‘userid’.
Iain