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

  • Home
  • SEARCH
  • 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 9116815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:45:49+00:00 2026-06-17T04:45:49+00:00

So far from reading the git tutorails I have understood that for sharing my

  • 0

So far from reading the git tutorails I have understood that for sharing my project files residing in my ubuntu linux server I need to create a bare repository and link it to the actual repository, so that when users clone the actual repo they get the actual repo having the actual work files.

And when they push their changes to the server the post-receive hook now updates the actual repo containing work files.

This is all I could understand and beyound that I have a lot of confusion for which I have the foll questions:

1) How do I create my bare repo.
2) How do I link it to the actual repo consisting the actual work files.
3) And what is this post-receive hook? Where does it reside? And what configurations do I need to do for the same.
  • 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-06-17T04:45:50+00:00Added an answer on June 17, 2026 at 4:45 am

    How do I create my bare repo.

    Read this.

    To clone existing repository into a new bare repo, you would run this command:

    git clone --bare my_project my_project.git
    

    How do I link it to the actual repo consisting the actual work files.

    Read this.

    The non-bare repository can add the bare as a remote:

    git remote add <name> <remote-URL>
    

    Then, from the non-bare:

    git push <name-of-remote> <branch-to-push-from>:<remote-branch-to-push-to>. 
    

    Again, this is all covered in the Git SCM book, which I recommend you read before asking the same question again on StackOverflow.

    Read the book. It gives you the terms to search for (such as git remote repositories, git bare server, etc). There are lots of questions on StackOverflow about this, when you know what to search for.

    And what is this post-receive hook?

    It’s a script that is run after the repository is pushed to. (After it has received data, the repository runs the post-receive script – sensible naming).

    Where does it reside?

    In the hooks directory of the bare repository; in .git/hooks otherwise. Read this.

    And what configurations do I need to do for the same.

    You do not need a post-receive hook to do what you’re asking to do (set up a basic bare repository so a small number of multiple users can git push and git pull from it). If you do not know what a hook is, you do not need one at this point. Set up your repository, get comfortable using basic git commands and working with collaborators on a bare repo, and ask a specific question about setting up and using a post-receive hook.

    I can’t stress this enough: read the book. It will help. I learned a lot. 🙂 It will tell you how to:

    1. How do I create my bare repo. (This is Chapter 4).
    2. How do I link it to the actual repo consisting the actual work files. (This is Chapter 2, section 5).
    3. And what is this post-receive hook? Where does it reside? And what configurations do I need to do for the same. (This is Chapter 7, section 3).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So far i have an assembly script that lets you boot from it and
I have been using WPF for a new project which is far from done.
So far I have only been updated a view from within its controller. I
I know from reading Microsoft documentation that the "primary" use of the IDisposable interface
From reading the documentation Jekyll's template data one might think that the way to
I bet that I could find the answer of this question from reading similar
I currently have a thread that listens for data from the network and then
I have a task which is reading from a disk, potentially going to take
I have a JTextPane which is populated by reading from a file, after which
I have a questions concerning boost::asio::ip::tcp::socket and the associated write functions. From reading the

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.