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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -