简体   繁体   English

如何克隆我现有的Rails应用

[英]How to clone my existing rails app

I have a rails app that on my local development machine and I want to copy it and have a sort of starting point in case I don't want to start over from scratch later for future projects. 我在本地开发机器上有一个Rails应用程序,我想复制它并有一个起点,以防万一我不想为以后的项目从头开始。 Is there a rails command I can use to "clone" it or should I simply copy and paste the directory? 我可以使用“ rails”命令克隆它吗?还是应该简单地复制并粘贴目录?

There is no rails command to clone your app. 没有Rails命令可以克隆您的应用程序。 But you can install git on your system and create a git repo to do what you want easily. 但是您可以在系统上安装git并创建一个git repo来轻松完成您想要的操作。 To do this go to your rails app root and execute 为此,请转到您的Rails应用根目录并执行

git init
git add .
git commmit -m "Your commit message"

You can then continue working and commit your changes as needed or discard all or individual changes. 然后,您可以继续工作并根据需要提交更改,或者放弃所有或单个更改。 You can also clone your app with the git clone commmand. 您还可以使用git clone来克隆您的应用程序。

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

相关问题 你如何克隆rails应用程序? - How do you clone a rails app? 如何为我的应用程序创建Twitter样式的URL-使用现有应用程序或重新设计应用程序-Ruby on Rails - How do I create Twitter style URLs for my app - Using existing application or app redesign - Ruby on Rails 如何使我现有的ruby gem配置可用于rails-api应用程序? - How to make my existing ruby gem configuration available to my rails-api app? 如何克隆和运行另一个用户的Rails应用程序 - How to clone and run another user's Rails app 如何将现有的 Rails 应用程序嵌入/挂载到另一个 Rails 应用程序中? - How to embed/mount existing Rails app into another Rails app? 如何将现有的Rails应用程序移至heroku? (sqlite到postgres) - How do I move my existing rails app onto heroku? (sqlite to postgres) 如何使用现有的SQL数据库将Rails应用程序部署到Heroku? - How do I deploy my rails app to Heroku using an existing SQL database? 如何在Facebook画布上以不同方式显示我现有的Rails应用程序 - How do I show my existing rails app differently on Facebook canvas 如何从现有的 Rails 6 应用程序中删除 Minitest? - How to remove Minitest from existing Rails 6 app? 如何使用现有的git存储库复制Rails应用程序? - How to copy Rails app with existing git repository?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM