简体   繁体   English

如何使用现有的git存储库复制Rails应用程序?

[英]How to copy Rails app with existing git repository?

I want to copy and paste my Rails app, only with different name. 我只想使用其他名称复制并粘贴我的Rails应用。 Here is my problem. 这是我的问题。

When I go into my new rails app folder its on master branch, but I can't push anything from there. 当我进入新的rails app文件夹时,它位于master分支上,但是我无法从那里推送任何内容。 It belongs to my first(old) app. 它属于我的第一个(旧)应用程序。 I should remove git from new app and make entirely new repository, or even better copy and paste repository from old app and change its name, so I could push new app to new repository and old app to old repository. 我应该从新应用程序中删除git并创建一个全新的存储库,或者甚至更好地从旧应用程序中复制并粘贴存储库并更改其名称,这样我就可以将新应用程序推送到新存储库,而将旧应用程序推送到旧存储库。

is there away to do this. 有没有办法做到这一点。

look in the .git/config for .git/config寻找

[remote "origin"]
  url = git@bitbucket.org:some_path.git
  fetch = +refs/heads/*:refs/remotes/origin/*

and change that 并改变它

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM