0

I have a small app that I'm running on EC2, and I want to make changes locally and then push to EC2 to deploy those changes.

Some people suggest doing a bare repo on the remote and then pushing to that. But that doesn't accomplish what I want because the bare repo doesn't actually have the project files in the directory tree.

I got it working by cloning the bare repo elsewhere on the EC2 instance, but this is clunky and not great for a workflow when I'm making changes on my local machine.

Is git just not designed for this type of usage? I'm considering removing git entirely and instead just ftp'ing files to the instance when I change them.

  • It's really not clear what you are asking – Paolo Oct 05 '22 at 17:19
  • https://stackoverflow.com/search?q=%5Bgit%5D+ec2+push+to+deploy , https://stackoverflow.com/search?q=%5Bgithooks%5D+push+to+deploy – phd Oct 05 '22 at 17:20
  • 1
    It's really unclear how you are using Git, if project files aren't in the Git directory tree then where are they? It certainly sounds like you are trying to use Git as a deployment tool (which it is not), instead of a source control tool (which it is). By no means should you stop using a source control tool, unless you want to lose your source code at some point in the future. However for deployments you should look at AWS CodeDeploy, or possibly Elastic Beanstalk. – Mark B Oct 05 '22 at 17:27

0 Answers0