title: How to bypass pre-commit hooks after fixing merge conflicts?
body: <p><strong>TLDR: <code>git rev-parse -q --verify MERGE_HEAD</code> errors out when NOT in a merge state. How can I get a similar command that would error out when we're IN a merge state?</strong></p>
  
  <hr>
  
  <p><strong>Problem:</strong> when I merge master into my branch and it has conflicts, I have to manually correct them, then commit. In some cases though, I have too many changes coming from master, so I'd rather just skip the pre-commit hooks.</p>
  
  <p><strong>Partial solution:</strong> I could just run <code>git commit --no-verify</code> and get things merged, but that's because I know about the flag. Other developers might not know about it and so (1) they spend more time than needed waiting for the pre-commit hooks to run and (2) as it could take too long, they tend to be less likely to remerge master (assumption).</p>
  
  <p><strong>Almost definitive solution:</strong> I found a way to detect if I am in a merge state by using <code>git rev-parse -q --verify MERGE_HEAD</code>. It returns a hash when in merge state, and errors out when NOT in merge state. But what I need is exactly the opposite. I need it to error out when I AM in a merge state, so I could add it as a pre-commit hook to all my hooks. That'd make them fail in the first line, then not execute the following command.</p>
  
  <pre><code>  "husky": {
      "hooks": {
        "pre-commit": "lint-staged"
      }
    },
    "lint-staged": {
      "*.js": [
        "git rev-parse -q --verify MERGE_HEAD",
        "eslint --max-warnings 0 --fix"
      ],
      "*.scss": [
        "git rev-parse -q --verify MERGE_HEAD",
        "stylelint 'app/**/*.scss'"
      ],
      "*.{js,json,yml,scss,md}": [
        "git rev-parse -q --verify MERGE_HEAD",
        "prettier --write"
      ],
      "*": [
        "bundle exec rubocop --auto-correct --force-exclusion"
      ]
    },
  </code></pre>
  
  <p>Note that the above mentioned does not work. In order for it to work, all we need is to reverse the effect from <code>git rev-parse -q --verify MERGE_HEAD</code>, i.e, it should error out when we are in a merge state. How can I do this in a simple command?</p>