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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:34:28+00:00 2026-05-29T10:34:28+00:00

I would like to set up Git to work on my site so I

  • 0

I would like to set up Git to work on my site so I can can

  1. I have a repo on my computer (index.php, contact.php, etc)
  2. Set up my webserver (hostgator) so that I can commit to the server
  3. Make it so that when I commit, the website’s code changes as that’s the code I’m working on

All the tutorials that I saw show how to push it onto github which is not what I’m looking for. Also I don’t want and git files to be viewable because it contains some PHP passes and stuff in them.

I plan on having different projects on my site. So for now there’s one subfolder like /forums that have all the files for that but later I may create another project so I’ll make each folder into it’s own repo.

Are there any tutorials or video tutorials on how to do this? Any blogs or such? I jest need a nudge in the right direction

  • 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-29T10:34:29+00:00Added an answer on May 29, 2026 at 10:34 am

    You should have SSH access to your web server.

    1. Connect to your webserver using SSH, and create the initial
      repository there (git init).

    2. Then, clone this repository in your computer (git clone).

    3. Add the website files into the repository (git add), and commit
      (git commit). Commits in git are always local. You need to
      push them to the remote repo. So…

    4. Push your changes to the webserver repository (git push)

    5. To “checkout” these changes automatically to your website, you need
      to add a post-receive hook (see https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)

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

Sidebar

Related Questions

I have a local Git repo that I would like to push to a
I have a commit template set up for git, and I would like to
I would like to set some limits/boundaries on the amount of pixels we can
I would like to set values on an url like this: <a href='http://$data_url/viewyournote.php?chapter='$name_of_chapter'&note='$id_note'&user='$username'> Then
I'm considering migrating from Subversion to Git at work, and would like to get
I have a project hosted on GitHub and I would like to work locally
Newbie Git question: I have a repo set up on bitbucket. I git fetched
I use BitKeeper at work, and I would like to have a basic code
I have recently set up a bugzilla instance for bug tracking and would like
I used the same command syntax above as in Mysql and would like set

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.