git 和 heroku 的问题
我遇到了双重问题:一个是 git:如何删除所有 .rb ~ 文件?另一个是 Heroku:我如何推送到特定的 url?例如,我有这个 http://morning-day-54.heroku.com 但我执行 git push heroku master 并且此 url 没有变化。
I'm having a double problem: one with the git: how do I remove all the .rb ~ files? and another one with the heroku: how do I do a push to a specific url? for example, I have this http://morning-day-54.heroku.com but I do git push heroku master and there is no change in this url.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要为下一次提交暂存删除其中一个文件,您可以执行以下操作:
.... 或者要在单个目录中暂存删除许多此类备份文件,您可以执行以下操作:
要暂存删除中的所有备份文件存储库中,您应该使用
find
和xargs
- 例如:在暂存所有删除后,您应该使用以下命令提交:
... 并阻止它们被删除将来跟踪,将它们添加到您的
.gitignore
中,例如:在您的 Heroku 问题上,确实没有足够的信息让某人能够找出问题所在。由于这确实是一个单独的问题,因此我建议您为此开始一个新问题,但请确保准确列出您正在尝试的命令以及遇到的任何错误。
To stage the removal of one of those files for the next commit, you could do:
.... or to stage the removal of many such backup files in a single directory, you could do:
To stage the removal of all backup files in the repository, you should use
find
andxargs
- for example:After you've staged all the removals, you should commit that with:
... and to stop them being tracked in the future, add them to your
.gitignore
, for example:On your Heroku question, there's really not enough information for someone to be able to work out what's going wrong. Since that's really a separate issue, I'd suggest that you start a new question for that, but make sure that you list exactly the commands you're trying and any errors that you get.
使用 git remove ,您应该能够从存储库中删除文件。
此外,heroku url 是随机生成的,除非您使用自定义域插件,否则您无法选择它们。
Using
git remove
you should be able to remove files from the repo.Also heroku urls are randomly generated, you cant choose them unless you use the custom domain addon.