{"action":"created","issue":{"url":"https://api.github.com/repos/datasift/gitflow/issues/91","repository_url":"https://api.github.com/repos/datasift/gitflow","labels_url":"https://api.github.com/repos/datasift/gitflow/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/datasift/gitflow/issues/91/comments","events_url":"https://api.github.com/repos/datasift/gitflow/issues/91/events","html_url":"https://github.com/datasift/gitflow/issues/91","id":133251346,"number":91,"title":"Negalist of commitids, to make rewind safe","user":{"login":"mcast","id":36801,"avatar_url":"https://avatars.githubusercontent.com/u/36801?v=3","gravatar_id":"","url":"https://api.github.com/users/mcast","html_url":"https://github.com/mcast","followers_url":"https://api.github.com/users/mcast/followers","following_url":"https://api.github.com/users/mcast/following{/other_user}","gists_url":"https://api.github.com/users/mcast/gists{/gist_id}","starred_url":"https://api.github.com/users/mcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcast/subscriptions","organizations_url":"https://api.github.com/users/mcast/orgs","repos_url":"https://api.github.com/users/mcast/repos","events_url":"https://api.github.com/users/mcast/events{/privacy}","received_events_url":"https://api.github.com/users/mcast/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-12T14:11:48Z","updated_at":"2016-02-13T18:55:51Z","closed_at":"2016-02-13T18:55:51Z","body":"Working in a small team of developers using `git hf`, I concluded that we needed to rewind (`git push -f origin`) the master branch to fix a mistake.\r\n\r\nLater I discovered that hubflow will merge the old (unwanted) commit with no warning and very little indication of what happened, if not every developer gets the \"rewind your local checkout!\" email in time.  This resulted in the need to `git revert`, which then caused subsequent merges to have rather more conflicts than necessary.  Sure, I would not have taken that route if I had known, but sometimes a rewind looks like the best of a set of bad choices.\r\n\r\nTherefore I propose a feature,\r\n\r\n1. if, after `git fetch -p`, there is a remote branch called `negalist`, the local `negalist` branch should created or fast-forwarded along it.  Otherwise, or if the local exists when the remote doesn't - bail out.\r\n2. the local `negalist` branch is consulted for the file `badcommit`.  If branch or file are absent, it is empty.\r\n3. any commitid listed should be rejected.  If any tags or local or remote branches contain any of them, bail out.\r\n4. the `negalist` branch is probably maintained manually and linearly, and probably doesn't share any history with `master`.\r\n5. to remove the negalist branch (for why? not sure), remove `origin/negalist` and clean up each working copy when it bails out.\r\n\r\nBailing out consists of telling the branch or tag names, the offending commitid, and advising the caller to \"consult your email inbox or local Git guru before proceeding\".\r\n\r\nI think the algorithm above will work.  The basic plan is to put the brakes on everything until the offending commits are properly forgotten.\r\n\r\nThanks, m"},"comment":{"url":"https://api.github.com/repos/datasift/gitflow/issues/comments/183723435","html_url":"https://github.com/datasift/gitflow/issues/91#issuecomment-183723435","issue_url":"https://api.github.com/repos/datasift/gitflow/issues/91","id":183723435,"user":{"login":"mcast","id":36801,"avatar_url":"https://avatars.githubusercontent.com/u/36801?v=3","gravatar_id":"","url":"https://api.github.com/users/mcast","html_url":"https://github.com/mcast","followers_url":"https://api.github.com/users/mcast/followers","following_url":"https://api.github.com/users/mcast/following{/other_user}","gists_url":"https://api.github.com/users/mcast/gists{/gist_id}","starred_url":"https://api.github.com/users/mcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcast/subscriptions","organizations_url":"https://api.github.com/users/mcast/orgs","repos_url":"https://api.github.com/users/mcast/repos","events_url":"https://api.github.com/users/mcast/events{/privacy}","received_events_url":"https://api.github.com/users/mcast/received_events","type":"User","site_admin":false},"created_at":"2016-02-13T18:55:51Z","updated_at":"2016-02-13T18:55:51Z","body":"On second thoughts, this could and probably should be a separate little tool.  Maybe I will add it to [mcast/git-yacontrib](https://github.com/mcast/git-yacontrib).\r\nIt could then be invoked from pre-commit / pre-push / pre-receive / (?)post-rewrite hooks to protect any clone.  Or chained in after `git fetch` on the `git-hf` operations, if it should happen earlier.\r\n\r\nSorry for the noise, m"}}