{"provider_url":"https://hatena.blog","blog_title":"memo-mode","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fganmacs.hatenablog.com%2Fentry%2F2014%2F06%2F18%2F224132\" title=\"master\u30d6\u30e9\u30f3\u30c1\u306bpush\u3055\u305b\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u30d5\u30c3\u30af - memo-mode\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","url":"https://ganmacs.hatenablog.com/entry/2014/06/18/224132","categories":["git "],"title":"master\u30d6\u30e9\u30f3\u30c1\u306bpush\u3055\u305b\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u30d5\u30c3\u30af","width":"100%","published":"2014-06-18 22:41:32","author_name":"ganmacs","image_url":null,"provider_name":"Hatena Blog","blog_url":"https://ganmacs.hatenablog.com/","version":"1.0","description":"git push -f origin master\u3092\u3057\u3066\u300cmaster\u30d6\u30e9\u30f3\u30c1\u304c\u3042\u3042\u3042\u3042\u3042\u3001\u3042\u3063\u3042\u3063\u3042\u3063\u300d\u3068\u306a\u3089\u306a\u3044\u305f\u3081\u306b(\u4eca\u65e5\u306a\u3063\u305f) $HOME/.git_template/hooks\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u3064\u304f\u308b $ mkdir -p ~/.git_template/hooks \u4f5c\u6210\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bpre-push\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b $ emacs ~/.git_template/hooks/pre-push pre-push #!/bin/sh # if the branch is master, then fail. branch=\"$(git symbolic-ref HEAD 2\u2026","author_url":"https://blog.hatena.ne.jp/ganmacs/","type":"rich"}