checkout - git: fatal: Cannot switch branch to a non-commit '12382' -


someone else on team created new git branch, committed , pushed usual remote work with. when try check out branch, this:

% git checkout 12382 fatal: cannot switch branch non-commit '12382' 

i have not had trouble checking out other branches repository; tried checking 1 out right after (one did not have local copy of), , worked fine.

i tried building server branch on our go pipeline, worked fine - means server successful in checking out branch.

tried check status of things:

% git remote show origin * remote origin   fetch url: git@gitlab.mycompany.com:mycompany/myrepository.git   push  url: git@gitlab.mycompany.com:mycompany/myrepository.git   head branch: stage   remote branches:     10112                     tracked     10198                     tracked     10678                     tracked ...     12382                     tracked    <<<--- ...   local branches configured 'git pull': ...   local refs configured 'git push': ... 

could suggest how fix this? went wrong?

git confused, because 12382 looks commit hash. use qualified name checkout branch:

git checkout refs/heads/12382 -- 

or, if it's remote branch:

git checkout refs/remotes/origin/12382 -- 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -