asking github if we can set receive.denyNonFastForwards=true for masters

89 views
Skip to first unread message

Dan Kortschak

unread,
Feb 19, 2015, 8:55:30 PM2/19/15
to gonu...@googlegroups.com
OK, so last week I clobbered some work on gonum/plot due to an erroneous
push -f (I forgot to qualify the branch and so it went to master as well
as my working branch). This was quickly fixed and the relevant other
devs notified.

I would like to avoid the possibility of this happening again.

It seems that while bitbucket allow setting this attribute per branch
via their web interface, github do not. However, it also seems that it
can be done via a contact to github support[1].

Do we want to do this for all the masters under gonum?

Dan

[1]http://samtuke.com/2014/09/prevent-git-history-re-writes-with-denynonfastforwards-on-github-bitbucket/

Vladimír Chalupecký

unread,
Feb 19, 2015, 9:32:31 PM2/19/15
to gonu...@googlegroups.com
I think we definitely want that if we plan doing git push -f to PR or working branches.

Apart from that I would like to point out again that everyone should have the push strategy set to 'simple' (or even 'nothing') to avoid accidents like that:

$ git config --global push.default simple

Vladimir

Dan Kortschak

unread,
Feb 19, 2015, 11:20:12 PM2/19/15
to Vladimír Chalupecký, gonu...@googlegroups.com
I've sent a query to the support team about whether this is possible.

Dan Kortschak

unread,
Feb 20, 2015, 6:38:57 AM2/20/15
to Vladimír Chalupecký, gonu...@googlegroups.com
This has been done. Default branches for all gonum repos will reject
non-fast forward pushes.
Reply all
Reply to author
Forward
0 new messages