2
respostas

error: failed to push some refs

kemue@DESKTOP-8SPRH7K MINGW64 ~/Documents/git-e-github (master) $ git push local master To C:/Users/kemue/Documents/git-e-github/kemuel/ ! [rejected] master -> master (fetch first) error: failed to push some refs to 'C:/Users/kemue/Documents/git-e-github/kemuel/' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Alguém saberia a solução?

2 respostas

Olá Kemuel!

Dê esse comando git remote -v e veja de o remote local está para o caminho correto.

Espero atualizações :)

Olá Vitor, está para o caminho correto sim

$ git push local master Enumerating objects: 3, done. Counting objects: 100% (3/3), done. Writing objects: 100% (3/3), 228 bytes | 114.00 KiB/s, done. Total 3 (delta 0), 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/kemue/Documents/git-e-github/servidor/ ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to 'C:/Users/kemue/Documents/git-e-github/servidor/'

kemue@DESKTOP-8SPRH7K MINGW64 ~/Documents/git-e-github/kemuel (master) $ git remote -v local C:/Users/kemue/Documents/git-e-github/servidor/ (fetch) local C:/Users/kemue/Documents/git-e-github/servidor/ (push)