Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Erro ao digitar comando git push local master

$ git push local master

Enumerating objects: 7, done. Counting objects: 100% (7/7), done. Delta compression using up to 2 threads Compressing objects: 100% (5/5), done. Writing objects: 100% (7/7), 646 bytes | 107.00 KiB/s, done. Total 7 (delta 1), reused 0 (delta 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/usuario/Desktop/CursoGit/servidor/bare/.git/ ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to 'C:/Users/usuario/Desktop/CursoGit/servidor/bare/.git/'

Se eu digitar o git pull:

$ git pull local master

fatal: couldn't find remote ref master

fatal: the remote end hung up unexpectedly

3 respostas

Fala, Henrique.

Pra onde você tá tentando dar o push? É o repositório local?

Se sim, aparentemente você o inicializou sem o parâmetro --bare.

Henrique, você conseguiu resolver o problema?

solução!

Bom dia Vinicius, desculpe por não ter respondido, antes.

Não me lembro exatamente como eu solucionei, mas sim, eu consegui resolver já que eu concluí o curso.

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