title: Exclude a line within a hunk in git commit
body: <p>Is there a way in IntelliJ to exclude certain lines within a code chunk from git commit?</p>
  
  <p>Say for example I have the following change:-</p>
  
  <p><a href="https://i.stack.imgur.com/7J5pj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7J5pj.png" alt="enter image description here"></a></p>
  
  <p>I want to exclude the last line (<em>ADMIN_API_URL</em>) from being committed.</p>
  
  <p>I know I can do partial commits by clicking on that small checkbox next to the line number 49 (<a href="https://blog.jetbrains.com/idea/2018/02/intellij-idea-2018-1-eap-partial-git-commits-and-more/" rel="nofollow noreferrer">as described here</a>), but that would remove the whole hunk. I just want to remove specific lines. If there is no straight way to do this, is there a way to split a hunk into multiple hunks? Then I would be able to do what I want.</p>
  
  <p>I can do this in Sourcetree by right clicking on some lines and selecting "Stage Selected Lines". Just want to know how to do it in IntelliJ and also, it would be good to know how to do this using git commands.</p>