Possible git bug (`git checkout` failure) -


this closest can come minimal example. (granted, example weird, that's par-for-the-course minimal examples.)

run following script in suitable scratch directory (e.g. /tmp). script create directorydemo`, , initialize repo in it. create *two entirely distinct branches, having nothing in common.* these branches populated content coming out of 2 github repos.

#!/bin/bash  rm -rf demo mkdir demo cd demo git init git commit -m 'root commit' --allow-empty  url in https://github.com/octocat/spoon-knife \            https://github.com/octocat/hello-worid     rm -rf content      basename=$(basename $url)     branch_name=${basename%.git}     git branch $branch_name     git checkout $branch_name     git clone $url content     rm -rf content/.git     git add content     git commit -m $branch_name     git checkout master done  git branch -a git checkout spoon-knife 

at end of script, current branch spoon-knife. if 1 issues command git checkout hello-world, git fails error:

error: pathspec 'hello-world' did not match file(s) known git. 

is valid behavior?

you created branch hello-worid tried checkout hello-world?

not sure why name repo , confuse yourself...


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -