Fix a Git detached head?

前端 未结 23 1399
臣服心动
臣服心动 2020-11-22 05:42

I was doing some work in my repository and noticed a file had local changes. I didn\'t want them anymore so I deleted the file, thinking I can just checkout a fresh copy. I

23条回答
  •  心在旅途
    2020-11-22 06:36

    Since "detached head state" has you on a temp branch, just use git checkout - which puts you on the last branch you were on.

提交回复
热议问题