git-tfs: A shelved pending change on a file is required

I’m trying out gittfs, and I’m trying to unshelve a shelveset by running the following:

git tfs unshelve "Shelveset Name" shelf

I’m getting the following error:

  • pushing to gihub error using Rails
  • Git Revert “revert is not possible because you have unmerged files”
  • Git on Windows, “Out of memory - malloc failed”
  • git stash `No local changes` but git status `ahead of origin/master by 3 commits`
  • the receiving end does not support push options
  • Set a specific date for a GIT tag
  • A shelved pending change on a file is required: $/path/to/dir/deleted

    “deleted” is a directory that was deleted in the shelveset.

    I’m only just starting with git-tfs. I need to checkin that shelveset, so for the time being I can do it with TFS alone, but if possible I’d like to know what might be going on and avoid it if possible.

    Thanks for any help.

  • Problems with branches, messed up my master on a fork
  • Github repo name and local folder name for repo
  • gitattributes not setting merge driver correctly
  • How to keep the 2 latest tags in gitlab and remove the oldest?
  • Git clone is incredibly slow on my Mac. How can I fix that?
  • Git rebase: finding the “next” commit to be rebased?
  • 3 Solutions collect form web for “git-tfs: A shelved pending change on a file is required”

    It seems that TFS dislikes trying to unshelve shelvesets that contain deleted files. I did the following and it worked:

    • Unshelve in Visual Studio (2012)
    • Exclude any deleted files
    • Shelve again (from VS2012)
    • Use git-tfs to pull the shelveset into a local Git branch
    • Manually delete the file(s) that had been removed from the original shelveset

    A pain, I know, but it at least helped me salvage the shelveset. For context, this was during a migration from TFS to Git in which we were able to retain history and pull shelvesets into remote branches so developers didn’t need to muddy TFS with incomplete checkins.

    This error message is not one of git-tfs but one of TFS (I just looked at the source code).

    I just don’t remember exactly how git-tfs manage shelveset because since I switch to git-tfs I never used again due to the fact that shelvesets are very badly designed 🙁 And I think that your problem come from that design problem!

    With a shelveset, which is in fact a bunch off file diff, you never know what is the root changeset from where it was “generated”. So, if you try to unshelve it quite later, you’ve got some problems (like the one I think you have) because file or folder were renamed or removed!

    I think that your problem come from the fact that you try to unshelve with a checkouted git commit too recent.

    Perhaps try to checkout a commit approximatively at the date of the shelveset and try to unshelve!
    If it works, you should just have to rebase your commit on your branch.

    If it doesn’t work, I don’t know…

    And Internet doesn’t help us with this TFS error message 🙁

    edit: since then, I think that git-tfs has been improved and perhaps it unshelve to the right parent commit.

    You can now force git-tfs to ignore these errors

     --force   Get as much of the Shelveset as possible, and
               log any other errors

    Git Baby is a git and github fan, let's start git clone.