Git push получает сообщение «ошибка: отказ от обновления извлеченной ветки»

Вот'что ядо сих пор сделали:

Я успешно клонировал мое удаленное хранилище в новый каталог на моей локальной машине.

Затем я отредактировал файл в рабочей копии, зафиксировал его и попытался отправить в удаленное хранилище. Вот'S ошибка, которую я получил:

$ git push origin master
[email protected]'s password:
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 456 bytes | 0 bytes/s, done.
Total 5 (delta 4), 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: error: is denied, because it will make the index and work tree inconsist
ent
remote: error: with what you pushed, and will require 'git reset --hard' to matc
h
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to

remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into

remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some

remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set

remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To [email protected]:/var/www/html
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to '[email protected]:/var/www/html'

У вас есть идеи, как я могу решить эту проблему? Благодарю.

Вот'Моя локальная конфигурация Git:

$ git config -l
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
merge.tool=tortoisemerge
gui.recentrepo=C:/Users/Chris/Dev/Projects/html
[email protected]
user.name=CBarnhill
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
[email protected]:var/www/html
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
user.name=Chris Barnhill
[email protected]
gui.wmstate=normal
gui.geometry=887x427+26+26 171 192

Ответы на вопрос(2)

Ваш ответ на вопрос