Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Confused about deplyoing application on openshift server using git

Tags:

git

php

openshift

I am using openshift server to host my php application. I have added files to my server using sftp to ~/app-root/runtime/repo directory. The same files are accesible over the web. But when I git clone my repository to my local machine I don't see my uploaded files in it. Neither when I add and push files using git are seen in my app-root folder. Any help is kindly appreciated

like image 451
Sanks Avatar asked Nov 26 '25 16:11

Sanks


1 Answers

Changes made directly on the gear's repo/ dir are not tracked by git, and will be overwritten when you push your local git repo to the gear. To track them, scp/sftp them back to your local git repo and add/commit/push them across.

The alternative to scp/sftp is to run "rhc snapshot {appName}" which will take a backup of all your files (code and data in case of snapshot), then you can extract the files under the repo/ dir back to your local git repo, and add/commit/push them across.

Feel free to post to our forums: https://openshift.redhat.com/community/forums/openshift

like image 114
Nam Duong Avatar answered Nov 28 '25 07:11

Nam Duong



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!