origindeploy (bluehost 上的裸仓库有一个钩子(Hook)可以推送到 www 文件夹以供所有人查看站点)因此,由于我在两个不同的地点工作,所以工作流程应该是这样的:
origin (github)deploy (bluehost)还在我身边吗?
这已经工作了一段时间,对我来说它很棒
然后我在泳池里撒尿
我不小心将文件 ftp 到 bluehost (启用了 sublime sftp),现在当我尝试将 deploy 最新和最好的推送到 bluehost 时,我得到错误一切都是最新的,如果我做了一些更改,做一个新的 commit 然后推送,我得到错误 such and such file will be overwritten with merge,提交或 stash ...
local repo 和git repo 都查好了,是bluehost 搞砸了。
请帮我解决这个问题。我已经尝试用谷歌搜索这个并阅读这里的其他帖子,但一切似乎都无法解决我的问题。我尝试了 push --force 但无济于事。
任何想法都会很棒。还是我应该删除整个 bluehost 文件夹并使用全新的 git 存储库重新开始,让事情再次发生?
编辑: 从 git 中输出
C:\xampp\htdocs\www\testingboard>git status
# On branch master
nothing to commit, working directory clean
C:\xampp\htdocs\www\testingboard>git push deploy master
danferth@danferth.com's password:
Everything up-to-date
C:\xampp\htdocs\www\testingboard>git add -A
C:\xampp\htdocs\www\testingboard>git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: index.php
#
C:\xampp\htdocs\www\testingboard>git commit -m "added mobile variable to index.p
hp"
[master e0be437] added mobile bariable to index.php
1 file changed, 5 insertions(+)
C:\xampp\htdocs\www\testingboard>git push origin master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 353 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
To https://github.com/danferth/breadBoard.git
9e9f3c1..e0be437 master -> master
C:\xampp\htdocs\www\testingboard>git push deploy master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 353 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: From /home4/danferth/git/breadboard
remote: 9e9f3c1..e0be437 master -> origin/master
remote: error: Your local changes to the following files would be overwritten by
merge:
remote: .sass-cache/6329d896b0dd00f287815f75641600307d9f0023/css_didI.sc
ssc
remote: _START/pageTitle.php
remote: assets/custom_css/css_didI.css
remote: assets/custom_css/css_didI.scss
remote: content/p_didI.php
remote: didI.php
remote: index.php
remote: template.php
remote: Please, commit your changes or stash them before you can merge.
remote: Aborting
remote: Updating 0dc9e3d..e0be437
To danferth@danferth.com:~/git/breadboard.git
9e9f3c1..e0be437 master -> master
C:\xampp\htdocs\www\testingboard>
最佳答案
在部署服务器上,使用 shell 访问并转到 www 文件夹(git repo checkout)。然后使用 git status获取不同步的文件列表。然后使用 git checkout -- <paths>从 git repo 恢复这些文件,使它们恢复同步。那么你应该能够git pull在服务器上,或者只是 git push deploy您的本地更改。
由于您使用的是提交后 Hook ,因此更改已存在于部署服务器上的裸仓库中,但尚未出现在 checkout 的 www 位置中。所以一个git pull应该让您的网络服务器保持最新状态。
关于git - 我在池中撒尿 GIT 风格 - ftp'd 文件到 repo 现在 GIT 不同步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16906812/
我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou
我在我的项目目录中完成了compasscreate.和compassinitrails。几个问题:我已将我的.sass文件放在public/stylesheets中。这是放置它们的正确位置吗?当我运行compasswatch时,它不会自动编译这些.sass文件。我必须手动指定文件:compasswatchpublic/stylesheets/myfile.sass等。如何让它自动运行?文件ie.css、print.css和screen.css已放在stylesheets/compiled。如何在编译后不让它们重新出现的情况下删除它们?我自己编译的.sass文件编译成compiled/t
我在我的项目中添加了一个系统来重置用户密码并通过电子邮件将密码发送给他,以防他忘记密码。昨天它运行良好(当我实现它时)。当我今天尝试启动服务器时,出现以下错误。=>BootingWEBrick=>Rails3.2.1applicationstartingindevelopmentonhttp://0.0.0.0:3000=>Callwith-dtodetach=>Ctrl-CtoshutdownserverExiting/Users/vinayshenoy/.rvm/gems/ruby-1.9.3-p0/gems/actionmailer-3.2.1/lib/action_mailer
在MRIRuby中我可以这样做:deftransferinternal_server=self.init_serverpid=forkdointernal_server.runend#Maketheserverprocessrunindependently.Process.detach(pid)internal_client=self.init_client#Dootherstuffwithconnectingtointernal_server...internal_client.post('somedata')ensure#KillserverProcess.kill('KILL',
我已经从我的命令行中获得了一切,所以我可以运行rubymyfile并且它可以正常工作。但是当我尝试从sublime中运行它时,我得到了undefinedmethod`require_relative'formain:Object有人知道我的sublime设置中缺少什么吗?我正在使用OSX并安装了rvm。 最佳答案 或者,您可以只使用“require”,它应该可以正常工作。我认为“require_relative”仅适用于ruby1.9+ 关于ruby-主要:Objectwhenrun
我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳
我已经像这样安装了一个新的Rails项目:$railsnewsite它执行并到达:bundleinstall但是当它似乎尝试安装依赖项时我得到了这个错误Gem::Ext::BuildError:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcheckingforlibkern/OSAtomic.h...yescreatingMakefilemake"DESTDIR="cleanmake"DESTDIR="
关闭。这个问题需要detailsorclarity.它目前不接受答案。想改进这个问题吗?通过editingthispost添加细节并澄清问题.关闭8年前。Improvethisquestion在首页我有:汽车:VolvoSaabMercedesAudistatic_pages_spec.rb中的测试代码:it"shouldhavetherightselect"dovisithome_pathit{shouldhave_select('cars',:options=>['volvo','saab','mercedes','audi'])}end响应是rspec./spec/request
似乎无法为此找到有效的答案。我正在阅读Rails教程的第10章第10.1.2节,但似乎无法使邮件程序预览正常工作。我发现处理错误的所有答案都与教程的不同部分相关,我假设我犯的错误正盯着我的脸。我已经完成并将教程中的代码复制/粘贴到相关文件中,但到目前为止,我还看不出我输入的内容与教程中的内容有什么区别。到目前为止,建议是在函数定义中添加或删除参数user,但这并没有解决问题。触发错误的url是http://localhost:3000/rails/mailers/user_mailer/account_activation.http://localhost:3000/rails/mai
文章目录一、概述简介原理模块二、配置Mysql使用版本环境要求1.操作系统2.mysql要求三、配置canal-server离线下载在线下载上传解压修改配置单机配置集群配置分库分表配置1.修改全局配置2.实例配置垂直分库水平分库3.修改group-instance.xml4.启动监听四、配置canal-adapter1修改启动配置2配置映射文件3启动ES数据同步查询所有订阅同步数据同步开关启动4.验证五、配置canal-admin一、概述简介canal是Alibaba旗下的一款开源项目,Java开发。基于数据库增量日志解析,提供增量数据订阅&消费。Git地址:https://github.co