简体   繁体   English

需要有关如何复制现有 Repo、重命名和创建新 Repo 的指导

[英]Need Guidance on how to copy an existing Repo, rename it and create a new Repo

我有一个用于应用程序的 Cypress 自动化的现有存储库。我想复制存储库 -> 重命名 -> 为另一个应用程序创建一个新存储库

  1. Clone the existing repo that you want to copy.克隆要复制的现有存储库。 Let's call it Cypress.我们称之为赛普拉斯。
  2. Duplicate the folder (right click->Duplicate on macOS) and rename it Cypress2.复制文件夹(在 macOS 上右键单击 -> 复制)并将其重命名为 Cypress2。
  3. Delete the .git folder.删除.git文件夹。 Any folder that starts with a period .任何以句点开头的文件夹. is hidden by default so you will first have to "show hidden files" for your OS.默认情况下是隐藏的,因此您首先必须为您的操作系统“显示隐藏文件”。
  4. git init in the Cypress2 folder. Cypress2 文件夹中的git init

Or you can do the above on the command line like this:或者您可以在命令行上执行上述操作,如下所示:

  1. git clone ... to your Downloads folder git clone ...到您的下载文件夹
  2. cp -R ~/Downloads/Cypress ~/Downloads/Cypress2
  3. rm -R ~/Downloads/Cypress2/.git
  4. cd ~/Downloads/Cypress2
  5. git init

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

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