I fetched a remote repository(git fetch) and pulled(git pull) the
contents from it successfully.
Now I change a file in the working directory,stage it(git add) and
commit(git commit) it and then push(git push) it back to the remote
repository,it gives me the following error.
C:\Lmg_test\MasterRepository>git push C:\MasterRepository
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 327 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
remote: error: refusing to update checked out branch: refs/heads/
remote: error: By default, updating the current branch in a non-bare
remote: error: is denied, because it will make the index and work tree
remote: error: with what you pushed, and will require 'git reset --
hard' to matc
remote: error: the work tree to HEAD.
remote: error: You can set 'receive.denyCurrentBranch' configuration
remote: error: 'ignore' or 'warn' in the remote repository to allow
remote: error: its current branch; however, this is not recommended
remote: error: arranged to update its work tree to match what you
pushed in some
remote: error: other way.
remote: error: To squelch this message and still keep the default
remote: error: 'receive.denyCurrentBranch' configuration variable to
! [remote rejected] master -> master (branch is currently checked
error: failed to push some refs to 'C:\MasterRepository'
What exactly does this error convey?Is there any other command that
needs to be executed before moving ahead with the push?
Thanks in Advance
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at