0

I right clicked on the latest, selected reset branch to this commit, and choose the "soft, keep all local changes" option.

I've lost some things, but it kept other things.
So what exactly does a soft reset to commit do?

derHugo
  • 83,094
  • 9
  • 75
  • 115
  • Welcome to Stack Overflow. I don't think this question is suitable, and you don't need to include the Unity tag. But to answer your question, a quick Google will bring up great documentation on reseting by Atlassian. https://www.atlassian.com/git/tutorials/undoing-changes/git-reset – Steven Coull Jan 18 '19 at 06:00
  • `lost some things, but it kept other things` what kind of `things` where lost and kept exactly? Was Unity opened or closed while you did that? Where there renamings (especially casing) involved ...? – derHugo Jan 18 '19 at 06:37
  • @derHugo Hmmm now that i think about it, it seems ignored file extensions stayed but tracked ones were lost. For example, I don't track any 3D models, but I track scenes and scripts etc. I lost scenes and scripts and such but 3D models were saved – fuzymarshmello Jan 19 '19 at 14:14

1 Answers1

0

A soft reset (examples here) should only move Git branch HEAD, without touching anything else (not the index, not the working tree).
That means nothing should be "lost"

There is the Microsoft/vscode issue 32459 which mentions:

As an author of git tooling, the fact that git clean is invoked when the intention is to discard changes only is indeed surprising. As mentioned before, the meaning of change within git is clear, and does not include untracked files.

It seems to me that the whole issue stems from introducing new terminology on top of git - this operation should use wording analog to 'hard reset' and 'soft reset'.

Maybe in your case, a git clean was performed, and untracked files were... cleaned (deleted).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hmmm now that i think about it, it seems ignored file extensions stayed but tracked ones were lost. For example, I don't track any 3D models, but I track scenes and scripts etc. I lost scenes and scripts and such – fuzymarshmello Jan 19 '19 at 14:14