I wanted to branch off my master into a new branch, say new-branch. However, I accidentally ran git checkout -b add new-branch
.
Now I cannot view any of my other branches or checkout to my origin master. The command seems to have created a new repo locally.
I've tried using git revert
to fix this, to no avail.
I would like to know how to get to my origin repo and delete the submodule.
add
from an existing ref callednew-branch
. Ifnew-branch
is an unknown ref, the command should fail ("fatal: 'new-branch' is not a commit and a branch 'add' cannot be created from it").