Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-897

Cannot unstage file in a new git repo before the first commit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 1.3.2
    • None
    • Git
    • None

      This is because SourceTree runs 'git reset <file>'. This works perfectly fine in every case other than before the first commit, where it reports

      fatal: Failed to resolve 'HEAD' as a valid ref.
      

      In fact in this case we should be using 'git rm --cached'. You can't use this for any other case than newly added files, since for existing files it removes them from the repository. Typical usability issues from git...

              Unassigned Unassigned
              sstreeting Steve Streeting (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: