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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:06:31+00:00 2026-06-13T09:06:31+00:00

I am using Git for simple website development and deployment. I develop on localhost,

  • 0

I am using Git for simple website development and deployment.

I develop on localhost, pushing my changes to the server which deploys the web to the corresponding directory via posthook and

GIT_WORK_TREE=/var/www/website/httpdocs/ git checkout -f

My problem is that all user uploads on the live server (uploaded by the website users or via backend) get deleted which live in

/var/www/website/httpdocs/assets/uploads

How can I keep these files when automatically checking out/deploying the web without tracking them in my repository?

  • 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-13T09:06:32+00:00Added an answer on June 13, 2026 at 9:06 am

    What you want to do is move your user upload directory outside webroot and symlink from webroot to the user upload directory.

    For reference:
    https://serverfault.com/questions/147185/website-deployment-managing-user-uploaded-content

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

Sidebar

Related Questions

I deploy code to my production server using git. This might include changes to
Using the dead simple tutorial on Heroku's website and when I run git push
I have been using git to push my local code to a server. I
I'm trying to do some automation scripts using git, simple things like updating submodules,
Our team recently started using Git. The main workflow we're doing is simple, (as
I have a simple blog application written in Python, using Django. I use Git
I have a very simple git repository that I've been using to learn git.
I am developing a ruby on rails website using heroku and git. What tools
I am trying to execute a simple git command using following python script. #!/usr/bin/python
This is probably very simple but I've just started using git. I've installed it

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.