git - lost local commit when checking out a remote branch -


i checked out master branch, , did changes. committed changes on master branch did not push repository.

what did next check out remote master again. not see local commit anymore.

how local commit back?

you need reset head. use following revert previous commit.

git reflog 

this give list of commits head values. choose head commit made local master branch.

then, following,

git reset --hard head@<i> 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -