home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 657210253

This data as json

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-657210253 https://api.github.com/repos/pydata/xarray/issues/4218 657210253 MDEyOklzc3VlQ29tbWVudDY1NzIxMDI1Mw== 14808389 2020-07-12T11:39:58Z 2020-07-12T13:23:34Z MEMBER

you could try to undo that by: getting the hash of the latest commit (7bf9df9d75c40bcbf2dd28c47204529a76561a3f right now), then calling sh git reset <hash> git push -f

Since I've been afraid of that mistake as well, I added a git hook that makes git refuse to push to master and stable on the main repository (use --no-verify to override it): ```bash $ cat .git/hooks/pre-push

!/usr/bin/env bash

protected_remotes="origin" protected_branches="master stable"

isin() { local list="$1" local substring="$2"

for element in $list
do
    [[ "$element" == "$substring" ]] && return 0;
done

return -1;

}

readonly() { remote="$1" branch="$2"

if isin "$protected_remotes" "$remote" && isin "$protected_branches" "$branch"
then
    return 0;
else
    return -1;
fi

}

remote="$1"

IFS=" " while read local_ref local_sha remote_ref remote_sha do branch="$(echo $remote_ref | sed 's#^refs/heads/##g')" if readonly "$remote" "$branch" then echo "cannot push to $remote/$branch: protected branch. Use --no-verify to override this." exit -1 fi done ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  655382009
Powered by Datasette · Queries took 0.927ms · About: xarray-datasette