Native git allows partial commits: You can commit only some of the lines of your file and leave the rest for a later commit.
Is this possible in TortoiseGit?
Select any file and/or folders you want to commit, then TortoiseGit → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.
For those who use Git Extensions: 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.
Yes, there are official instructions in the docs.
In practice, I find this workflow useful:
The answer https://stackoverflow.com/a/32527098/3906760 is basically correct, however there are fewer steps required.
These steps are required as TortoiseGit does not yet support the full staging process and hunk/block selection, cf. https://tortoisegit.org/issue/2299.
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