Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
Description
One of the most useful features of Sourcetree is the ability to stage and unstage lines and hunks instead of a whole file. This is a feature I often use for new files, however, it's currently only possible to stage lines and hunks in new files, it's not possible to unstage lines and hunks.
Use cases for new files include:
- Splitting a new file into multiple themed commits for ease of review
- Running new database migrations multiple times and resetting the AUTO_INCREMENT counter during development but not wanting to check the reset part of the query into the repository
Usually I'd like to stage the whole file, then remove certain lines. However, currently I have to either stage an empty file, then selectively stage just the lines I want, or temporarily delete the lines I don't want to commit, then stage the whole file.
Please allow new files to have their lines and hunks unstaged the same way it's already possible to do with existing files.