mysterious vanishing branches in git

前端 未结 2 602
被撕碎了的回忆
被撕碎了的回忆 2021-01-20 19:14

Here are some git actions I performed. As you can see, I made a new branch, modified my files, and then committed the changes. After changing back to another branch, hoping

2条回答
  •  忘掉有多难
    2021-01-20 19:33

    for some reason, you're getting a detach head situation. I'm not entirely sure how that is caused in a regular git repo, but i've encountered it using git svn (and came up with my own solution here). It might be that the aren't --tracking the upstream repo when you create a new branch. Usually when you get a detached head, when you do a git branch, you will see (asterisk) (no branch) (don't know how to do a literal asterisk with markdown)

提交回复
热议问题