This is exactly what I did:
I did a lot of work on branch new-feature
.
I added and committed it
git add .
git commit -m "did lots of work"
I checked out main
git checkout main
I merged new-feature
into main
git merge --no-ff new-feature
I checked out a new branch.
git checkout -b new-branch
did lots of work there, added, committed it, checkout out main
and merged it in, just as before.
Then I checked out new-feature
and all my work I committed back then is gone!!
I don't know what happened. It was definitely all there when I committed it originally. Where did it go? It's almost like the last commit I made - the most important one - on that branch, it gone!
Any advice?? (freaking out a bit here)