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

The Archive Base Latest Questions

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

From my Workstation, I can push modification to a git bare repository on my

  • 0

From my Workstation, I can “push” modification to a git bare repository on my server, which contains a Hook that runs “git checkout -f”, so I can deploy my site via Git.

The thing is that users of my website can upload files (like images). And without those files, the website can’t work. So my question is : How can I get to my workstation the modifications on the live version ? (like uploaded files by users).

** EDIT : Some details about the procedure I followed to set this configuration : **

On the server, which already contains the site :

$ cd /home/website/www
$ git init
$ git add *
$ git commit -m 'First commit !'

… then create a bare repository…

$ cd /home/website
$ mkdir www.git 
$ cd www.git
$ git init --bare

… then set hooks stuf…

$ git config core.bare false
$ git config core.worktree /home/website/www
$ git config receive.denycurrentbranch ignore
$ cat > hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/home/site/www git checkout -f  

… then commit for the bare repository :

$ git add /home/website/www
$ git commit -m "First commit of the bare repository"   On my workstation, on a new folder, to get the whole directory :

$ mkdir /Users/me/Sites/website/
$ git init
$ git remote add live ssh://root@myserver.com/home/website/www.git
$ git pull live master

Then it works. If i modify files on my workstation and want to make
them live, I just have to “git push live master”.

  • 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-17T07:49:40+00:00Added an answer on June 17, 2026 at 7:49 am

    I would not recommend to commit those images back to the bare repo (if those images are large or numerous, the size of the bare repo could quickly becomes too important for easy cloning)

    But you can use you hook to copy back those images in some shared directory that you can then access from your workstation (and that you can rsync, in order to get only the delta).
    Basically, I would recommend getting those images back without using git.

    • 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 on my workstation which I push to a
When I develop with the server on my workstation I can use XDebug from
From a previous question I have seen that the CLR has workstation and server
I know that normally there are no problems using Git from different OSs to
I have a view with a grid that contains items added to a workstation.
If I execute cap deploy from a workstation how can I specify custom feedback
I find we can start monkey from workstation, by using the following command: adb
I need to lock the workstation from a windows service written in VB.Net. I
From my website, I have a button which calls a method and then generates
From this context: import itertools lines = itertools.cycle(open('filename')) I'm wondering how I can implement

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.