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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:11:53+00:00 2026-05-20T01:11:53+00:00

OK so I have a repo setup on my machine and I’m looking to

  • 0

OK so I have a repo setup on my machine and I’m looking to use this to push updates to a location on a fileserver. I used the following to clone:

Starting in dir on machine:

git init
git add .
git commit -m 'initial'
cd ../

Then cloning onto fileserver

git clone -bare testdir fileserverip/testdir

This clones fine but how can I use GIT to update? Unlike my previous experience with GIT I’m not looking to connect over SSH or anything so how can I set up the push?

EDIT:

After modifying my setup as mentioned in the answer by Makis I get the following errors on git push

james-macbook:test2 james$ git push
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 506 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
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'.
To xxxxxxxxxxxxxxxxxxx
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'xxxxxxxxxxxxxxxxxxx'
james-macbook:test2 james$ 

Anyone know what this means?

EDIT: Just found this, think it’s what I need. http://tiredblogger.wordpress.com/2009/11/09/creating-local-git-repositories-yeah-its-that-simple/

Thanks

  • 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-20T01:11:54+00:00Added an answer on May 20, 2026 at 1:11 am

    If you can mount the server directory via NFS or Samba, easy peasy. I would have created the bare repository on the server first. Then clone the empty repository on your machine and add the stuff.

    After that, everything works like normal (pull, push).

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

Sidebar

Related Questions

I have setup a private repo from a windows machine to GitHub. I am
Hi I have SVN repo that I frequently use for change management. However after
I have reccently setup Hg on my server and my hgweb.config contains this: [paths]
I have a repo setup, and am just learning about how branches work. Right
I'm trying to setup a Git repo on my local machine for work that
I have a team repo setup in our LAN, and it's group writable so
I have setup a local git on my machine. When I initialized git, I
my setup is ubuntu - gitolite - msysgit. After following this tutorial : https://sites.google.com/site/senawario/home/gitolite-tutorial
I have a repo in which I want to push changes. I want to
We have a Git repo setup where it is extremely helpful to check-in not

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.