|–question
git clone Downloading a repository gives a warning that no related code is being generated
warning: The remote HEAD points to a reference that does not exist and cannot be detected.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
|–solution
The .git directory .git/refs/heads does not have a file pointed to by HEAD
git branch -a
git checkout remotes/origin/Zoro
At this point, there is code in the project directory
git branch
prompt
(the header pointer is separated from origin/Zoro)
git checkout -b remotes/origin/Zoro
Switch to a new branch ‘remotes/origin/Zoro’
* remotes/origin/Zoro
create head
git branch -m remotes/origin/Zoro master
* master Switch to master branch
git branch -a
* master
remotes/origin/Zoro
attention:git help branch(command name) View help
Similar Posts:
- Git Unable to switch remote branches error: pathspec ‘origin/XXXX’ did not match any file(s) known to git
- Git pull does not specify an error message for the branch
- [Solved] Git review Error: Errors running git rebase -i remotes/gerrit/master
- [Solved] error: cannot lock ref ‘refs/remotes/origin/[branch]’
- [Git]fatal: You are not currently on a branch.
- Git Pull Error: Please specify which branch you want to merge with.
- A rejected – non fast forward error occurred in eclipse push
- IDEA Could Not pull Codes to Local Error: Can’t Update No tracked branch configured for branch master or the branch doesn’t exist.
- A rejected – non fast forward error occurred in eclipse push