How are you doing this task in Perforce ?
In the Commit window, select the file you want to partially commit, then select the text you want to commit in the right pane, then right-click on the selection and choose 'Stage selected lines' from the context menu.
To literally commit only those files, even if other changes have been staged, the second example ( git commit [some files] , which implies the --only switch) should be used. The first example ( git add [some files] followed by git commit ) will also commit any other changes which had been staged.
git add -p is basically "git add partial (or patch)" Patch mode allows you to stage parts of a changed file, instead of the entire file. This allows you to make concise, well-crafted commits that make for an easier to read history. This feature can improve the quality of the commits.
To submit a pending changelist, issue the p4 submit command. When you issue the p4 submit command, a form is displayed, listing the files in the changelist. You can remove files from this list. The files you remove remain open in the default pending changelist until you submit them or revert them.
Yes, you can't do that.
The only thing you can do would be:
Then you still have the file in checkout, with the other modifications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With