Commit only part of a file in Git
You can use: git add –patch <filename> or for short: git add -p <filename> Git will break down your file into what it thinks are sensible “hunks” (portions of the file). It will then prompt you with this question: Stage this hunk [y,n,q,a,d,/,j,J,g,s,e,?]? Here is a description of each option: y stage this hunk for … Read more