Quantcast
Channel: git: rename local branch failed - Stack Overflow
Viewing all articles
Browse latest Browse all 11

git: rename local branch failed

$
0
0

I don't know why my attempt of renaming local branch failed. I basically cloned the project, then I also have a submodule within the project, and I downloaded the submodule code as well. However, when I use git branch within the submodule, I have:

* (no branch)  master

The code looks like I'm on another branch but the output shows that it doesn't have a name. Then I searched online to find how to rename local branch and I got this:

git branch -m <newname>

After I run this command git gave me this error:

error: refname refs/heads/HEAD not foundfatal: Branch rename failed

Anybody know why this happens? Thanks.


Viewing all articles
Browse latest Browse all 11

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>