Commit specific lines of a file to git [duplicate]

Question

Possible Duplicate:
How can I commit only part of a file in git

How do I commit a few specific line ranges from a file to git? while ignoring some other line changes in the same file.

Answer

Try git add -p -- it will interactively let you add, skip, or split diff hunks.

How to amend a commit without changing commit message (reusing the previous one)?

Error 'git' is not recognized as an internal or external command