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

erro ao fazer o push

$ git push local master Enumerating objects: 6, done. Counting objects: 100% (6/6), done. Delta compression using up to 4 threads Compressing objects: 100% (4/4), done. Writing objects: 100% (6/6), 661 bytes | 220.00 KiB/s, done. Total 6 (delta 1), reused 0 (delta 0), pack-reused 0 remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: is denied, because it will make the index and work tree inconsistent remote: with what you pushed, and will require 'git reset --hard' to match remote: the work tree to HEAD. remote: remote: You can set the 'receive.denyCurrentBranch' configuration variable remote: to 'ignore' or 'warn' in the remote repository to allow pushing into remote: its current branch; however, this is not recommended unless you remote: arranged to update its work tree to match what you pushed in some remote: other way. remote: remote: To squelch this message and still keep the default behaviour, set remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'. To C:/Users/fbmac/Documents/servidor/ ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to 'C:/Users/fbmac/Documents/servidor/'

1 resposta
solução!

O problema está no repositório que você criou, o "servidor", mt provavelmente ele foi criado via "git init", sendo que o ideal seria "git init --bare". Dessa maneira ele será um repositório puro, sendo possivel dar push para ele. Espero ter ajudado ^-^

Solução:Crie um novo repositorio "servidor" utilizando o comando: git init --bareE então do seu repósitorio de trabalho, adicione o servidor como repositório remoto: git remote add servidor <CAMINHO DO SERVIDOR>E finalmente envie todos os seus commits para o seu repositório remoto: ` git push servidor master

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software