Ruby on rails GIT:冲突文件database.yml中没有箭头/标记
我尝试了将git推送到托管服务(不是heroku)。主机服务屏幕上显示以下错误Ruby on rails GIT:冲突文件database.yml中没有箭头/标记,ruby-on-rails,git,Ruby On Rails,Git,我尝试了将git推送到托管服务(不是heroku)。主机服务屏幕上显示以下错误 U config/database.yml Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then use 'git add/rm <file>' as appropriate to mark resolution, or use 'git commit -
U config/database.yml
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
在按下git后,不会显示如下所示的错误
c:\xxx\rails\app>git push foo master
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 454 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
remote:
To ssh://xxx@xxx.xxx:2222/xxx/xxx.git
8199bb1..5d4a490 master -> master
如何显示箭头/标记或解决冲突?假设您在终端。做:
$ git status
这将显示分支、未跟踪的文件、更改和其他差异
$ git add .
git add将所有更改的文件都包含到提交中
$ git commit -m "NAME YOUR COMMIT"
将索引的当前内容存储在新的“提交”中。此提交包含用户所做的更改和创建的消息
“将更改从分支推送到并合并到远程分支(&B)。”我假设您在分支主控中
我鼓励您更多地了解GIT,这是一个很好的资源:
是否已保存并提交?感谢您的及时回复。我在更新我的问题时保存并提交了该文件。感谢您的及时回复和解释。虽然我做了
git add.
,git commit-m“xxx”
,然后git push origin master
,但有人告诉我它是冲突的。如果你做了git status
,你会得到以下(或类似)响应:#关于分支主控无需提交(工作目录清理)
谢谢你的评论,@Tom Hert。是,#在分支主机无需提交的情况下,将显示工作目录clean
。我是GIT的新手,所以我会按照你的建议学习更多关于GIT的知识。但如果您能给我一些建议,我将不胜感激。当您点击git push origin master
时,您得到了哪个错误?当我更新上面的问题时,命令行中没有出现错误消息(foo是我的托管服务器)。但是,正如我在问题开始时所写的,错误出现在托管服务器端,我无法部署我的应用程序。
$ git add .
$ git commit -m "NAME YOUR COMMIT"
$ git push origin master