git add -i is a command that brings up an interactive window. From there, you want to choose #5 (patch), and git will walk you through the steps. When you are ready to stage, you are presented with several choices - 'y' for yes etc. One of the useful choices is 's' - split. For example, you might have 5 new lines, and only 4 of those you want to commit. Using -s command, one can split these lines into separate commits, and proceed as needed.Actual details are available here.
No comments :
Post a Comment