Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
634 views
in Technique[技术] by (71.8m points)

ruby on rails - Alternative way to do an initial push of a large repo

I've got a largish Rails 3.1 app in development and production which I've only just set up a staging environment for on Heroku. Because my git repo is quite large, I'm getting time-out errors at around 33% every time I try to push.

Is there an alternative to doing git push staging master for this initial giant push?

The error message is

EmBP-2:Appname Emma$ git push staging master
Counting objects: 17421, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6363/6363), done.
Connection to 10.10.18.33 closed by remote host.46 KiB/s    
error: pack-objects died of signal 13
error: failed to push some refs to '[email protected]:appname-staging.git'

/////////////////// SOLUTION / EDIT, many months later...

There's a sneaky way to solve this, nowadays, using Heroku's (experimental) Pipeline feature, if you already have an environment set up to which you've pushed the code. From the Heroku docs:

"For example, you can push code to staging, have it built into a slug and later promote the staging slug to production."

Takes about 5 seconds for Heroku to push the existing slug from one app to another!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I was trying to push some changes with videos and got:

fatal: The remote end hung up unexpectedly
error: pack-objects died of signal 13
error: failed to push some refs to '[email protected]/XXX.git'

The solution for me was:

git repack
git push 

Hope this will help


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...