Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

error: remote origin already exists.

>> git init
Reinitialized existing Git repository in C:/Users/cliente/PycharmProjects/AluraPEP8/.git/
>> git add .
warning: in the working copy of '.idea/workspace.xml', LF will be replaced by CRLF the next time Git touches it
warning: adding embedded git repository: teste
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:   git submodule add <url> teste
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint: 
hint:   git rm --cached teste
hint: 
hint: See "git help submodule" for more information.
>> git commit -m 'frist commit'
[main 81b95d1] frist commit
 3 files changed, 3 insertions(+), 3 deletions(-)
 create mode 160000 teste
>> git remote add origin https://github.com/tiagosaraiva18/teste.git
error: remote origin already exists.
>> git push -u origin master 
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/tiagosaraiva18/teste4.git'

#oque eu faço??

1 resposta
solução!
  1. O comando git remote add origin https://github/com/tiagosaraiva18/teste.git já existe, foi criado no git add ., faça o update no seu master ao inves de fazer outro git add

Comando de update: git remote set-url origin git@github.com:tiagosaraiva18/teste.git no lugar do git remote add origin https://github.com/tiagosaraiva18/teste.git

Resposta baseada em: https://stackoverflow.com/questions/10904339/github-fatal-remote-origin-already-exists

  1. E no ultimo comando git push -u origin master, ele não encontrou no master seu teste4.git

Primeiro tente resolver o 1, se resolver ok. Caso não resolva, depois do comando set-url, faça outro commit.

Resposta baseada em: https://stackoverflow.com/questions/4181861/message-src-refspec-master-does-not-match-any-when-pushing-commits-in-git

Abraços