I’d like to do the following:
- Create a local git repo, let’s call it
~/my-awesome-app - create a folder on my site, let’s call it
mysite.com/my-awesome-app - Be able to just push any changes I make on
~/my-awesome-apptomysite.com/my-awesome-app
Can someone explain how I would set that up?
You can make
mysite.com/my-awesome-appa git repository and setreceive.denyCurrentBranchin it toignoreto allow pushing there but this is risky.If I wanted to do this, I’d make a bare repository on my server which I could push my code into and then change the
updatehook to export the latest tree intomysite.com/my-awesome-app(and optionally restart the app). That way, the repository and the deployed copy are two different things.