0
I started using git recently, created a local repository and a small project, versioned and uploaded it to an online repository, and no problems occurred, however, when I started developing another project (of course, in another directory), and when Versionar, a problem appeared to me, executed git init
but when trying to create a branch I get that warning:
Fatal: Not a Valid Object name: 'master'.
(The branch name is an example, this error occurs with any branch name I place) I can use git checkout -b master
and he returns the warning Switched to a new branch 'master'
, but when I execute the command git branch
he doesn’t return me a list of branchs, it’s like he hasn’t created a branch, and when I try commit
, it returns the following warning:
bash: id: No such file or directory.
I tried to git add
before creating some branch, but the same "symptoms" occur. I also tried to clone an empty online repository to work on, but I still can’t create branchs or commit. I ask for your help. Does anyone have any idea what it might be??
Does this happen if you give a name without spaces? I don’t think you can have space on behalf of branch
– Rafael Tavares
run out
git remote -v
shows the remote repository that is connected?– Ricardo Pontual
Hello @Rafaeltavares, good afternoon. The names of the branchs have no spaces, error occurs in any names like: master, Alter-1, A, B, etc...
– José Daniel
Hello @Ricardopunctual, good afternoon. Yes, when I perform
git remote -v
it shows me the remote repository that I am.– José Daniel