Changing Branch in Git -
i new in git.
i not come master branch. used several git bash command. mentioning result below.
$ git checkout master
error:pathspec 'master' did not match file(s) known git.
$ git branch master
fatal: not valid object name : 'greet'.
$ git branch
$ git branch -d greet
fatal:couldn't commit object head
i searched lot in google , stackoverflow not find solution.i installed , reinstalled git several times.also, have tried delete folders related git solution.
thanks in advance
git checkout master
if haven't committed files it.
$ mkdir project ; cd $_ ; git init . initialized empty git repository in /users/doon/desktop/project/.git/ $ git checkout master error: pathspec 'master' did not match file(s) known git.
if you've changed branch git checkout -b branchname
can switch master same way git checkout -b master
. once stage , commit files no longer error (assuming stage/commit master
branch.
Comments
Post a Comment