我可以删除我的本地.git回购吗? [英] Can I delete my local .git repo?

查看:144
本文介绍了我可以删除我的本地.git回购吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的heroku回购增长到1.5GB,所以在heroku支持的好友清除了远程heroku回购,并建议我推一个新的副本。

然而,du-h .git的结果显示.git为276m。而且,可以预见的是,当我尝试向主人推送时,heroku会引发错误。所以,我的问题是:我可以删除我的本地.git文件夹,执行 git init 并推送到heroku?



我的应用程序的代码被推送到github - 我平常的工作流程是:

  git add。 
git commit -mmessage
git push #to github
git push heroku master


解决方案

做upvoted的答案,但要记住,你不能推一个浅层克隆。这里有一个后续:浅浅克隆后推送到github

p>

My heroku repo grew to 1.5gb, so the nice fellows at heroku support cleared out the remote heroku repo and suggested I push a fresh copy.

However, the results of du -h .git locally show .git to be 276m. And, predictably, heroku throws an error when I try to push master to it.

So, my question: can I delete my local .git folder, do git init and push to heroku? What exactly would that do?

My app's code is pushed to github - my usual workflow is:

git add .
git commit -m "message"
git push #to github
git push heroku master

解决方案

Do the upvoted answer but bear in mind that you can't push a shallow clone. Here's a follow up: Pushing to github after a shallow clone

这篇关于我可以删除我的本地.git回购吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆