为什么配置文件夹不被推? [英] why config folder is not pushed?
问题描述
尽管我确信我已经添加了&将所有文件和文件夹放入我的本地git repo之前推
我不知道为什么远程repo缺少配置文件夹
我不知道如何调查这个问题,当然我没有将配置文件夹名称添加到.gitignore或.slugignore,但是它永远不会被推送!
我做了 git init
,git add。
, git提交
,然后
git push heroku master
/ pre>
所以,关于这个问题的想法?
编辑
当我尝试手动添加配置文件时,我得到:
sam @ ubuntu:〜/ RubymineProjects / dcaclab $ cd config
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ git add *
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ git commit -mconfig files
#在分支master
没有提交(工作目录清除)
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ git push heroku master
所有最新的
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $
编辑2
#有关忽略文件的更多信息,请参阅http://help.github.com/ignore-files/ 。
#
#如果您发现自己忽略了文本编辑器
#或操作系统生成的临时文件,则可能需要添加全局忽略:
#git config - 全局core.excludesfile〜/ .gitignore_global
#忽略bundler配置
#忽略默认的SQLite数据库。
/db/*.sqlite3
#忽略所有日志文件和临时文件。
/log/*.log
/ tmp
sam @ ubuntu:〜/ RubymineProjects / dcaclab $ ls config /
application.rb boot.rb database.yml environment.rb environments initializer locales newrelic.yml routes.rb
编辑3
sam @ ubuntu:〜/ RubymineProjects / dcaclab $ ls config
application.rb database.yml environments locales routes.rb
boot.rb environment.rb初始化器newrelic.yml
编辑4
sam @ ubuntu:〜/ RubymineProjects / dcaclab $ cd config
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ echo'test'> test_file
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ ls config
ls:无法访问config:没有这样的文件或目录
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ dir
application.rb database.yml environments locales routes.rb
boot.rb environment.rb initializers newrelic.yml test_file
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ git status
#在分支主管
#未加密的文件:
#(使用git add< file> ...包含在将被提交的内容)
#
#test_file
没有添加到提交但未跟踪的文件(使用git add来跟踪)
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ git add。
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ git commit -ma file
[master 55a0159]一个文件
1个文件已更改,1个插入(+)
创建模式100644 config / test_file
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ git push heroku master
计数对象:6,完成。
使用最多2个线程的Delta压缩。
压缩对象:100%(3/3)完成。
写入对象:100%(4/4),336字节,完成。
总共4(delta 2),重用0(delta 0)
-----> Heroku接收推送
-----> Ruby / Rack应用程序检测到
----->使用Bundler版本1.2.0.rc
安装依赖项运行:bundle install - 没有开发:test --path vendor / bundle --binstubs bin / --deployment
使用rake(0.9.2.2)
使用i18n(0.6.0)
使用multi_json(1.3.4)
使用activesupport(3.2.3)
使用builder(3.0.0)
使用activemodel 3.2.3)
使用erubis(2.7.0)
使用行程(1.0.3)
使用机架(1.4.1)
使用机架缓存(1.2)
使用机架测试(0.6.1)
使用远足(1.2.1)
使用倾斜(1.3.3)
使用链轮(2.1.3)
使用actionpack (3.2.3)
使用mime类型(1.18)
使用polyglot(0.3.3)
使用treetop(1.4.10)
使用邮件(2.4.4)
使用actionmailer(3.2.3)
使用isl(3.0.2)
使用tzinfo(0.3.33)
使用activerecord(3.2.3)
使用activeresource 3
使用bcrypt-ruby(3.0.1)
使用cancan(1.6.7)
使用茧(1.0.20)
使用coffee-script-source(1.3 .1)
使用execjs(1.3.2)
使用咖啡脚本(2.2.0)
使用rack-ssl(1.3.2)
使用json(1.7.1 )
使用rdoc(3.12)
使用thor(0.14.6)
使用轨道(3.2.3)
使用咖啡轨(3.2.2)
使用commonjs(0.2.6)
使用守护进程(1.1.8)
使用orm_adapter(0.0.7)
使用warden(1.1.1)
使用devise(2.0.4)
使用eventmachine(0.12.10)
使用google-analytics-rails(0.0.2)
使用haml(3.1.4)
使用jquery-rails(2.0.2)
使用jquery-rails-cdn(0.1.0)
使用json_pure(1.6.6)
使用less(2.2.1)
使用less-rails(2.2.3)
使用libv8(3.3.10.4)
使用on_the_spot(1.0.0)
我们使用导航(3.2.3)
使用路由过滤器(0.3.0)
使用sass(0.13.2)
使用绑定器(1.2.0.rc)
使用sass (3.1.17)
使用sass-rails(3.2.5)
使用simple_form(2.0.1)
使用therubyracer(0.10.1)
使用thin(1.3.1 )
从git://github.com/seyhunak/twitter-bootstrap-rails.git(在master)使用twitter-bootstrap-rails(2.1.0)
使用uglifier(1.2.4)
使用validate_url(0.2.0)
您的包完整!它被安装到./vendor/bundle
清理bundler缓存。
----->发现流程类型
Procfile声明类型 - > (none)
Ruby / Rack的默认类型 - >控制台,耙子,web
----->汇编的大小是18.7MB
----->启动...完成,v20
http://dcaclab3.herokuapp.com部署到Heroku
To git@heroku.com:dcaclab3.git
f434d33..55a0159 master - > master
sam @ ubuntu:〜/ RubymineProjects / dcaclab / config $ heroku运行bash -a dcaclab3
运行`bash`附加到终端... up,run.1
〜$ dir
app config.ru doc Gemfile.lock public README.rdoc test
bin db Gemfile lib Rakefile脚本厂商
编辑5
为了确保推送中的问题,并且我的本地提交工作正常:
sam @ ubuntu:〜/ RubymineProjects / dcaclab $ git ls-files config /
config / application.rb
config / boot.rb
config / database.yml
config / environment.rb
config / environments / development.rb
config / environments / production.rb
config / environments / test.rb
config / initializers / backtrace_silencers.rb
config / initializers / devise.rb
config / initializers / inflections.rb
config / initializers / mail.rb
config /初始化器/ mime_types.rb
config / initializers / secret_token.rb
config / initializers / session_sto re.rb
config / initializers / simple_form.rb
config / initializers / task_scheduler.rb
config / initializers / wrap_parameters.rb
config / locales / ar.yml
config / locales / devise.en.yml
config / locales / en.yml
config / locales / simple_form.en.yml
config / newrelic.yml
config / routes .rb
config / test_file
编辑6
确保没有其他的.gitignore潜伏着
sam @ ubuntu:〜/ RubymineProjects / dcaclab $〜/ .gitignore
bash:/home/sam/.gitignore:没有这样的文件或目录
sam @ ubuntu:〜/ RubymineProjects / dcaclab $ find〜/ RubymineProjects / dcaclab -name .gitignore
/home/sam/RubymineProjects/dcaclab/.gitignore
从$ GIT_DIR / info / exclude中读取的模式。
sam @ ubuntu:〜/ RubymineProjects / dcaclab $ cat〜/ RubymineProjects / dcaclab / .git / exclude
cat:/home/sam/RubymineProjects/dcaclab/.git/exclude:没有这样的文件o r目录
解决方案正如我已经联系英雄,我们发现删除文件.slugignore在文件旁边.gitignore修复了问题!
所以,这是一个在heroku方面的错误,可悲的是,这是原因,感谢每一个尝试帮助这个问题。
Although I am sure that I've added& committed ALL files and folders into my local git repo before push
I don't know why the remote repo is missing the config folder
I don't know how to investigate this problem, of course I didn't add the config folder name to the .gitignore or .slugignore , but, its never get pushed!
I did
git init
, gitadd .
,git commit
, thengit push heroku master
So, and idea about this issue ?
EDIT
When I try to add files in config manually, I get:
sam@ubuntu:~/RubymineProjects/dcaclab$ cd config sam@ubuntu:~/RubymineProjects/dcaclab/config$ git add * sam@ubuntu:~/RubymineProjects/dcaclab/config$ git commit -m "config files" # On branch master nothing to commit (working directory clean) sam@ubuntu:~/RubymineProjects/dcaclab/config$ git push heroku master Everything up-to-date sam@ubuntu:~/RubymineProjects/dcaclab/config$
EDIT 2
# See http://help.github.com/ignore-files/ for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global # Ignore bundler config # Ignore the default SQLite database. /db/*.sqlite3 # Ignore all logfiles and tempfiles. /log/*.log /tmp sam@ubuntu:~/RubymineProjects/dcaclab$ ls config/ application.rb boot.rb database.yml environment.rb environments initializers locales newrelic.yml routes.rb
EDIT 3
sam@ubuntu:~/RubymineProjects/dcaclab$ ls config application.rb database.yml environments locales routes.rb boot.rb environment.rb initializers newrelic.yml
EDIT 4
sam@ubuntu:~/RubymineProjects/dcaclab$ cd config sam@ubuntu:~/RubymineProjects/dcaclab/config$ echo 'test' > test_file sam@ubuntu:~/RubymineProjects/dcaclab/config$ ls config ls: cannot access config: No such file or directory sam@ubuntu:~/RubymineProjects/dcaclab/config$ dir application.rb database.yml environments locales routes.rb boot.rb environment.rb initializers newrelic.yml test_file sam@ubuntu:~/RubymineProjects/dcaclab/config$ git status # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # test_file nothing added to commit but untracked files present (use "git add" to track) sam@ubuntu:~/RubymineProjects/dcaclab/config$ git add . sam@ubuntu:~/RubymineProjects/dcaclab/config$ git commit -m "a file" [master 55a0159] a file 1 file changed, 1 insertion(+) create mode 100644 config/test_file sam@ubuntu:~/RubymineProjects/dcaclab/config$ git push heroku master Counting objects: 6, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (4/4), 336 bytes, done. Total 4 (delta 2), reused 0 (delta 0) -----> Heroku receiving push -----> Ruby/Rack app detected -----> Installing dependencies using Bundler version 1.2.0.rc Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment Using rake (0.9.2.2) Using i18n (0.6.0) Using multi_json (1.3.4) Using activesupport (3.2.3) Using builder (3.0.0) Using activemodel (3.2.3) Using erubis (2.7.0) Using journey (1.0.3) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.1) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.1.3) Using actionpack (3.2.3) Using mime-types (1.18) Using polyglot (0.3.3) Using treetop (1.4.10) Using mail (2.4.4) Using actionmailer (3.2.3) Using arel (3.0.2) Using tzinfo (0.3.33) Using activerecord (3.2.3) Using activeresource (3.2.3) Using bcrypt-ruby (3.0.1) Using cancan (1.6.7) Using cocoon (1.0.20) Using coffee-script-source (1.3.1) Using execjs (1.3.2) Using coffee-script (2.2.0) Using rack-ssl (1.3.2) Using json (1.7.1) Using rdoc (3.12) Using thor (0.14.6) Using railties (3.2.3) Using coffee-rails (3.2.2) Using commonjs (0.2.6) Using daemons (1.1.8) Using orm_adapter (0.0.7) Using warden (1.1.1) Using devise (2.0.4) Using eventmachine (0.12.10) Using google-analytics-rails (0.0.2) Using haml (3.1.4) Using jquery-rails (2.0.2) Using jquery-rails-cdn (0.1.0) Using json_pure (1.6.6) Using less (2.2.1) Using less-rails (2.2.3) Using libv8 (3.3.10.4) Using on_the_spot (1.0.0) Using pg (0.13.2) Using bundler (1.2.0.rc) Using rails (3.2.3) Using routing-filter (0.3.0) Using sass (3.1.17) Using sass-rails (3.2.5) Using simple_form (2.0.1) Using therubyracer (0.10.1) Using thin (1.3.1) Using twitter-bootstrap-rails (2.1.0) from git://github.com/seyhunak/twitter-bootstrap-rails.git (at master) Using uglifier (1.2.4) Using validate_url (0.2.0) Your bundle is complete! It was installed into ./vendor/bundle Cleaning up the bundler cache. -----> Discovering process types Procfile declares types -> (none) Default types for Ruby/Rack -> console, rake, web -----> Compiled slug size is 18.7MB -----> Launching... done, v20 http://dcaclab3.herokuapp.com deployed to Heroku To git@heroku.com:dcaclab3.git f434d33..55a0159 master -> master sam@ubuntu:~/RubymineProjects/dcaclab/config$ heroku run bash -a dcaclab3 Running `bash` attached to terminal... up, run.1 ~ $ dir app config.ru doc Gemfile.lock public README.rdoc test bin db Gemfile lib Rakefile script vendor
EDIT 5
To make sure that the problem in the push, and that my local commit works fine:
sam@ubuntu:~/RubymineProjects/dcaclab$ git ls-files config/ config/application.rb config/boot.rb config/database.yml config/environment.rb config/environments/development.rb config/environments/production.rb config/environments/test.rb config/initializers/backtrace_silencers.rb config/initializers/devise.rb config/initializers/inflections.rb config/initializers/mail.rb config/initializers/mime_types.rb config/initializers/secret_token.rb config/initializers/session_store.rb config/initializers/simple_form.rb config/initializers/task_scheduler.rb config/initializers/wrap_parameters.rb config/locales/ar.yml config/locales/devise.en.yml config/locales/en.yml config/locales/simple_form.en.yml config/newrelic.yml config/routes.rb config/test_file
EDIT 6
To make sure that there is no other .gitignore is lurking
sam@ubuntu:~/RubymineProjects/dcaclab$ ~/.gitignore bash: /home/sam/.gitignore: No such file or directory sam@ubuntu:~/RubymineProjects/dcaclab$ find ~/RubymineProjects/dcaclab -name ".gitignore" /home/sam/RubymineProjects/dcaclab/.gitignore
Patterns read from $GIT_DIR/info/exclude.
sam@ubuntu:~/RubymineProjects/dcaclab$ cat ~/RubymineProjects/dcaclab/.git/exclude cat: /home/sam/RubymineProjects/dcaclab/.git/exclude: No such file or directory
解决方案As I have contacted heroku, we discovered that removing the file .slugignore which is beside file .gitignore fixed the problem!
So, it was a bug at heroku side, sadly that was the reason, thanks for every body who tried to help on this question.
这篇关于为什么配置文件夹不被推?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!