Hangai
Hangai

Reputation: 317

Can I undo a checkout FETCH_HEAD?

I accidentally overwritten unstaged files on server by:

git fetch origin [branch_name]
git checkout FETCH_HEAD -- [branch_name] 

Upvotes: 2

Views: 362

Answers (1)

HenryGiraldo
HenryGiraldo

Reputation: 415

Your changes are lost. To avoid these situations in the future, use git stash before making moves that you are not sure of.

Upvotes: 1

Related Questions