github - Git branch inaccessible -
edit
also, because branches have same name, how can delete current 1 on (the wrong one)? if checkout master won't know branch correct.
edit edit
i have run
git branch --verbose
master 99b97d2 prep test migrate_to_rpsec d91fd47 start model tests * migrate_to_rspec 99b97d2 prep test
how can delete/switch upstream number? want 2nd item on list.
i created separate branch named migrate_to_rspec
. worked , committed branch
git add .
git commit -m 'finish model tests'
git branch
- master
- migrate_to_rspec
then moved master
git checkout master
then tried merge last branch
git merge migrate_to_rspec
and got merge: migrate_to_rspec - not can merge
so checked branch again
git branch
master
migrate_to_rspec
and couldn't other branch
git checkout migrate_to_rspec
and got: error: pathspec 'migrate_to_rspec' did not match file(s) known git.
so ran (stupidly) git checkout -b migrate_to_rspec
so have:
master
migrate_to_rpsec
migrate_to_rspec
how can got original branch? , how there 2 of them same name 1 can't access , 1 can?
the low-level command show full spelling of is
git for-each-ref
and can tell git delete whichever ref looks wrong
git update-ref -d $thatfullspelling
. . .
but in case, noticed problem:
migrate_to_rpsec migrate_to_rspec
. . .
Comments
Post a Comment