html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/4218#issuecomment-657273886,https://api.github.com/repos/pydata/xarray/issues/4218,657273886,MDEyOklzc3VlQ29tbWVudDY1NzI3Mzg4Ng==,6815844,2020-07-12T20:55:53Z,2020-07-12T20:55:53Z,MEMBER,"> I think the preferred option for dealing with accidentally pushed changes is to push a ""revert"" commit generated from git revert OK, understood. > but as long as we keep the master branch protected, it's always possible always possible to move forward by reverting changes -- there is no way to lose work. Then, probably the most dangarous part was when I unprotected the master branch. I was afraid of messing up the commit history, but it is much better than losing entire commit history...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,655382009 https://github.com/pydata/xarray/issues/4218#issuecomment-657215217,https://api.github.com/repos/pydata/xarray/issues/4218,657215217,MDEyOklzc3VlQ29tbWVudDY1NzIxNTIxNw==,6815844,2020-07-12T12:26:41Z,2020-07-12T12:26:41Z,MEMBER,"OK, thanks. > So I think either a pre-push hook or git config branch.master.pushRemote no_push (but then you also can't push to your own master anymore) are the best way forward Agreed. I'll use your pre-push hook. Thanks @keewis .","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,655382009 https://github.com/pydata/xarray/issues/4218#issuecomment-657212192,https://api.github.com/repos/pydata/xarray/issues/4218,657212192,MDEyOklzc3VlQ29tbWVudDY1NzIxMjE5Mg==,6815844,2020-07-12T11:59:11Z,2020-07-12T11:59:11Z,MEMBER,"BTW, is it possible to disallow direct push to master on github? Maybe we only need to *merge* PRs and but not *push*.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,655382009 https://github.com/pydata/xarray/issues/4218#issuecomment-657211959,https://api.github.com/repos/pydata/xarray/issues/4218,657211959,MDEyOklzc3VlQ29tbWVudDY1NzIxMTk1OQ==,6815844,2020-07-12T11:56:34Z,2020-07-12T11:56:34Z,MEMBER,"OK. Done. Thanks. I'll use your script. Thanks. And sorry again for my mistake.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,655382009 https://github.com/pydata/xarray/issues/4218#issuecomment-657211712,https://api.github.com/repos/pydata/xarray/issues/4218,657211712,MDEyOklzc3VlQ29tbWVudDY1NzIxMTcxMg==,6815844,2020-07-12T11:54:40Z,2020-07-12T11:54:40Z,MEMBER,"Maybe I can unprotect the master, but I'm hesitating this action...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,655382009 https://github.com/pydata/xarray/issues/4218#issuecomment-657211365,https://api.github.com/repos/pydata/xarray/issues/4218,657211365,MDEyOklzc3VlQ29tbWVudDY1NzIxMTM2NQ==,6815844,2020-07-12T11:51:31Z,2020-07-12T11:51:31Z,MEMBER,"Thanks. but it looks the master is protected and I cannot force push. ``` Total 0 (delta 0), reused 0 (delta 0) remote: error: GH006: Protected branch update failed for refs/heads/master. remote: error: Cannot force-push to this protected branch To https://github.com/pydata/xarray.git ! [remote rejected] master -> master (protected branch hook declined) error: failed to push some refs to 'https://github.com/pydata/xarray.git' ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,655382009