简体   繁体   English

git pull说config / environments / development.rb未提交

[英]git pull says config/environments/development.rb is not committed

Doing a pull from master into my local branch on a shared ROR project. 在共享的ROR项目上从master拉到我的本地分支。 Git says: Git说:

branch master -> FETCH_HEAD error: Your local changes to the following files would be overwritten by merge: config/environments/development.rb Please, commit your changes or stash them before you can merge. 分支主管-> FETCH_HEAD错误:您对以下文件的本地更改将被merge覆盖:config / environments / development.rb请在合并之前提交更改或存储它们。 Aborting 堕胎

development.rb is not showing up as having been modified, and, in fact, when I actually do modify it, it still doesn't show as having been modified. development.rb没有显示为已修改,实际上,当我实际对其进行修改时,它仍然没有显示为已修改。 This is happening on all branches, effectively preventing me from merging in master. 这发生在所有分支机构上,有效地阻止了我与master合并。

I should say here that I am a designer on this project and my ROR and Git skills are not huge (I have mostly been using the Tower GUI for managing branches). 在这里我应该说我是这个项目的设计师,我的ROR和Git技能也不是很多(我一直在使用Tower GUI来管理分支)。 However, I've been successfully contributing to the project for over a year and never came across this issue before. 但是,我已经为该项目成功贡献了超过一年的时间,之前从未遇到过这个问题。

If you type 'git status' do you see development.rb in the list of untracked files? 如果输入“ git status”,您是否在未跟踪文件列表中看到development.rb? If so you need to 'git add' it and commit. 如果是这样,您需要对其进行“ git add”并提交。

Alternately, in the root of your project look at .gitignore and see if it's listed in there for some weird reason. 或者,在项目的根目录中查看.gitignore,并查看它是否出于某些奇怪的原因而在其中列出。 It shouldn't be, but it's worth looking. 它不应该,但是值得一看。

My gut feeling that you are using git update-index --assume-unchanged development.rb , but don't remember it. 我的直觉是您使用的是git update-index --assume-unchanged development.rb ,但是不记得了。 If it is the case, use --no-assume-unchanged then. 如果是这种情况,请使用--no-assume-unchanged

It is hard to say without looking at your .gitignore but you could have config/environments/development.rb in that file, in which case you wouldn't see changes. 不查看.gitignore很难说,但是您可以在该文件中包含config / environments / development.rb,在这种情况下,您将看不到更改。

But that isn't the real issue, it sounds like you just need to commit then pull. 但这不是真正的问题,听起来您只需要先提交然后再拉。 This is what I would do. 这就是我要做的。

Add config/environments/development.rb to your commit, commit changes then pull. 将config / environments / development.rb添加到您的提交中,提交更改然后拉。 If that doesn't work, I would just delete your local copy and clone a new one. 如果那不起作用,我将删除您的本地副本并克隆一个新副本。

I hope that helps. 希望对您有所帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到config / environments / development.rb命令 - config/environments/development.rb command not found config / environments / development.rb:30:in <top (required)> &#39;:main:Object(NameError)的未定义局部变量或方法`config&#39; - config/environments/development.rb:30:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError) 如何从控制器访问配置标志(从config / environments / development.rb设置)? - How to access configuration flag (set from config/environments/development.rb) from a controller? 迁移 Rails 6.0.34 -&gt; 6.1 后,我无法在 config/environments/development.rb 中使用 model - After migration Rails 6.0.34 -> 6.1 I can't use model inside the config/environments/development.rb config / environments / development.rb中“consideration_all_requests_local”的用途? - Purpose of “consider_all_requests_local” in config/environments/development.rb? 我修改了/config/environments/development.rb,是否需要重启Apache? - I modified /config/environments/development.rb, do I need to restart Apache? rails生成rspec:install config / environments / development.rb:1:在`<top(required)>':undefined method`configure' - rails generate rspec:install config/environments/development.rb:1:in `<top (required)>': undefined method `configure' Rails 3在config / environments / development.rb中从lib加载类的问题 - Rails 3 problem loading classes from lib in config/environments/development.rb 在Rails项目中,我们将所有常量定义放在config / environment.rb中,将更多特定定义放在config / environments / development.rb中? - In a Rails project, we put all constants definition in config/environment.rb and more particular ones in config/environments/development.rb? 修改后的config / environment / development.rb以能够连接到电子邮件服务器。 重新启动Rails服务器时,出现错误 - modified config/ environments/ development.rb to be able to connect to an email server. When I restart rails server I get an error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM