Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-13969

Allow unstaging lines and hunks in new files

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • Git
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            17f180267b83 cjdennis
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: