[英]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.