Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6579273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:52:39+00:00 2026-05-25T15:52:39+00:00

Possible Duplicate: Git push error '[remote rejected] master -> master (branch is currently checked

  • 0

Possible Duplicate:
Git push error '[remote rejected] master -> master (branch is currently checked out)'

i will install an own viewer (a git web repository viewer that aims to be easy to set up and upgrade, light on dependencies, and comfortable to use) for my git and current works fine, but I have much trouble to use the own git. Before I only uses github as service. Now, on my own webspace it is possible to us install git and I have create this. But I get the follow message, if I push my new changes on source. Before i have send commit, and add files to the repo; but the push to the master is not possibele; only the follow messages is the answer.

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 inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
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'.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:52:40+00:00Added an answer on May 25, 2026 at 3:52 pm

    If you’ve set up a git repository on your own server, and want to use it as a central repository to push from/pull to, it should be a bare repository, not a normal one.

    (A bare repository doesn’t have a branch checked out.)

    You create a bare repository with:

    git clone --bare
    

    or possibly:

    git init --bare
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: git push error '[remote rejected] master -> master (branch is currently checked
Possible Duplicate: What exactly does the "u" do? "git push -u origin master" vs
Possible Duplicate: Using Git how do I find modified files between local and remote
Possible Duplicate: Show the original branch for a commit git version 1.7.4.1 I have
Possible Duplicate: Show just the current branch in Git I am moving my monotone
Possible Duplicate: In git, is there a simple way of introducing an unrelated branch
Possible Duplicate: Merging: hg/git vs. svn Hi, I'm a long time SVN user and
Possible Duplicate: Viewing Unpushed Git Commits How do I list all commits which have
Possible Duplicate: Storing third-party libraries in source control I'm currently starting a project which
Possible Duplicate: Restore a deleted file in a Git repo How do I restore

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.