<ul data-eligibleForWebStory="true">To commit specific parts of a file, use --interactive mode with git add.Identify untracked file with git status and make git track it with git add -N command.Use git add --interactive to customize commits on a line-by-line basis.Enter 'patch' in the prompt to access interactive mode.Select the file and choose specific lines to include in the commit.Edit the contents in the text editor to customize commit contents.Review changes with 'diff' and exit interactive mode when done.Commit the selected changes using git commit -m command.For remaining content, stage and commit separately using git add and git commit commands.Keep track of commits with git log for a clear listing.