3 ms·
This is what I would have expected. You: 1. Initialize a repo 2. Create and add a file 3. Do not commit 4. Hard reset the state to the last commit (which yo
by atoav 4y ago
This is what I would have expected. You:
1. Initialize a repo
2. Create and add a file
3. Do not commit
4. Hard reset the state to the last commit (which you have not made)
If you want to keep your staged files --hard is not your friend. The lesson here is that you have to be careful with reset --hard and that you have to have a commit with the state you wanna go back to.