Fix a Git detached head?

前端 未结 23 1640
臣服心动
臣服心动 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:43

    To further clarify @Philippe Gerber's answer, here it is:

    Before cherry-pick, a git checkout master is necessary in this case. Furthermore, it is only needed with a commit in detached head.

提交回复
热议问题