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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:54:15+00:00 2026-06-05T14:54:15+00:00

Ok, check this out. I have a mac osx server with git installed. We

  • 0

Ok, check this out. I have a mac osx server with git installed. We use it for collaborating on projects. What we want is to be able to push to none-bare repository on the server so that we can view the websites on it. The problem is, a none-bare repository has a user with the master checked out, so were not able to push to the master.

The only way I have found working is to push to another branch and then merge it into the master branch, thats time-consuming and boring.

So, is there a way to push to the master branch on the remote server and be able to view the webpage on the server?

  • 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-05T14:54:16+00:00Added an answer on June 5, 2026 at 2:54 pm

    A common way to deal with this is to have a bare repository with a hook that will checkout HEAD to the correct directory, as described here. Essentially, you would create a post-receive hook that does:

    GIT_WORK_TREE=/var/www/whatever git checkout -f
    

    Then you just push to that bare repository in order to deploy. This method the advantage over pushing to a non-bare repository that you won’t end up with a .git directory under /var/www/whatever, just the files in your project.

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

Sidebar

Related Questions

Check out this jsbin . I have a form with a custom button that
I have made this webpage, you can check it out here http://www.bettingtowin.net/webcam.html I have
(I would check this out for myself, but I don't have VS2010 (yet)) Say
Hey guys, check this out. I have a function that treats for me a
I want to match the url within strings like u1 = Check this out
I have [MySp], A stored procedure. So check this out.. when I run this
check this out: template <class T> class Test: public T { public: void TestFunc()
Please check this code out it compiles and runs absolutely fine.. The question is
If you don't know what I mean, check this image out: Multiple images I
Check out this demo by FaTaL. It is explained in his blog that he

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.