0

问题在于从下面的 git 使用 Limesurvey 时修改 Openshift 上的文件

https://github.com/gshipley/limesurvey-quickstart

安装完成后,我在本地存储库中添加了一个新文件,例如 php/front-end.html,git push然后在 openshift 访问我的 Limesurvey 应用程序,它再次将我带到安装程序页面。

为什么每次我都会影响和重置石灰测量安装git push?我该如何解决?

注意:我没有修改任何石灰调查文件,只是添加了新文件。

下面是 git 日志:

>git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   php/front-end.html
#
no changes added to commit (use "git add" and/or "git commit -a")

>git add php/front-end.html

>git commit -m "Test Front End"
[master dd7f21d] Test Front End
 1 file changed, 1 insertion(+)

>git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#   (use "git push" to publish your local commits)
#
nothing to commit, working directory clean

>git push
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 362 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Not stopping cartridge mysql because hot deploy is enabled
remote: Not stopping cartridge php because hot deploy is enabled
remote: Not stopping cartridge phpmyadmin because hot deploy is enabled
remote: Building git ref 'master', commit dd7f21d
remote: Checking .openshift/pear.txt for PEAR dependency..
remote: Preparing build for deployment
remote: Deployment id is dc93388e
remote: Activating deployment
remote: Not starting cartridge mysql because hot deploy is enabled
remote: Not starting cartridge phpmyadmin because hot deploy is enabled
remote: Not starting cartridge php because hot deploy is enabled
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://<long guid>@appname-namespace.rhcloud.com/~/git/appname.g
it/
   91e3033..dd7f21d  HEAD -> master
4

1 回答 1

0

当您执行 git push 时,您基本上是在覆盖在安装过程中生成的任何配置文件。
我可以看到解决此问题的两种方法:
1.) 将安装期间创建的文件复制到您的 OPENSHIFT_DATA_DIR (~/app-root/data) 中,然后在部署操作挂钩 (.openshift/action_hooks/ deploy)
2.) 在 openshift 上进行安装,然后 ssh 到您的设备并将创建的文件复制回本地 git 工作目录,并使用 git add && git commit 将它们添加到您的存储库,然后这些文件将被部署你对你的装备做一个 git push 。

于 2014-04-08T18:41:17.427 回答