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 406485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:30:04+00:00 2026-05-12T17:30:04+00:00

I have a local repository called TestRepo. I clone it with the –bare option,

  • 0

I have a local repository called TestRepo. I clone it with the –bare option, zip this clone up, and throw it on my server. Unzip it, and it’s still bare.

I then clone the bare remote repository locally over ssh with something like

git clone ssh://git@host.com/~/TestRepo.git TestRepoCloned

The local TestRepoCloned is not bare and has a remote called “origin.” It appears to be tracking correctly from the looks of its config file

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = ssh://git@host.com/~/TestRepo.git
[branch "master"]
    remote = origin
    merge = refs/heads/master

I edit an existing file. I commit the change to the current branch (master) via

git commit -a -m "Edited a file."

The commit succeeds and all is well.

I decide to push this change to the remote repository via SSH with a

git push

The remote repository is now no longer bare, but has a complete working directory, and I get continuous error messages on all further attempts to push to it.

Everything I’ve read seems to suggest that what I’m doing is correct, but it simply is not working. How am I supposed to push changes to a bare remote repo and actually keep it bare?

  • 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-12T17:30:04+00:00Added an answer on May 12, 2026 at 5:30 pm

    It might be possible that zip/unzip does not preserve file permission (e.g. executable bit) and thus activates some previously deactivated hooks. You might want to check hook permissions on server or skip the whole zip part and just create bare repository directly on the server and upload our data using regular git push.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a local repository cloned from a bare remote repository. The following command
I have a local mercurial repository with 5 commits that still need to be
What I've got is a local repository and 2 remote repositories (a bare called
I have a local repository where I work daily and a remote bare repository
I have a local repository I'm working on and its remote is hosted on
Since version 1.5 Subversion supports to have a local caching-proxy for the main Master-repository.
I have repository on GitHub to which I commit regularly from my local computer.
I have checked out files from my svn repository to a local project folder.
I have local server for my site (i made it with XAMPP). How can
we have a local staging server running sql server 2000 and a remote public

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.