'HEAD' is not a commit and a branch 'dev' cannot be created from it

I am trying to crease a brunch in visual studio code and getting this error message “‘HEAD’ is not a commit and a branch ‘dev’ cannot be created from it”.

head_is_not_a_commit

What’s the solution ?

Please share the git log as well, which contains the commands that were executed.