title: How to remove certain lines from last commit and add them to a new commit in git?
body: <p>In my last commit I added a certain lines in a file, which should've been added as a separate commit. How do I undo only those lines from the commit without deleting them altogether (as I still need to add them later)?</p>
  
  <p>I know I can do <code>git reset HEAD~1</code> to undo the commit entirely and then patch add <code>git add -p</code> only the lines I need and then commit it again. I was actually looking for a cleaner solution (if one exists)</p>