Skip to content

git restore after git cherry-pick -n can leave GVFS in a bad state #1855

Description

@tyrielv
  1. Use git cherry-pick -n to cherry-pick some changes to current branch, leaving them uncommitted
  2. Use git restore --staged to unstage the changes

Expected:
All the changes from the cherry-pick move from staged to unstaged in git status.

Actual:
Sometimes some changes disappear from git status.
The files still have the changed contents, but git no longer recognizes the files as being changed.

It's unclear so far whether cherry-pick -n is required or if manual changes with git add will also repro.

git checkout to another branch appears to properly reset the file contents. (I've heard others complain about situations where it did not, though I don't know if they were caused by this and I haven't repro'd that.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions