【发布时间】:2020-09-21 06:50:33
【问题描述】:
我的 github 仓库是:https://github.com/zorlakov/moviesAndShows 为了访问 react 文件和文件夹(src、public 等),您首先必须打开 movies-and-shows 文件夹。我正在考虑将该文件夹中的所有内容复制到父文件夹中,然后删除该文件夹并推送到 github。这会造成问题吗?
【问题讨论】:
标签: github
我的 github 仓库是:https://github.com/zorlakov/moviesAndShows 为了访问 react 文件和文件夹(src、public 等),您首先必须打开 movies-and-shows 文件夹。我正在考虑将该文件夹中的所有内容复制到父文件夹中,然后删除该文件夹并推送到 github。这会造成问题吗?
【问题讨论】:
标签: github
这对 Github 甚至 Git 来说都不是问题。
但是,如果您想保留历史记录并确保 Git 能够检测到移动/重命名,您应该分步进行:
git mv moves-and-shows/public .
git mv moves-and-shows/src .
git commit -m 'move public and src to root'
对于其他文件,它也应该可以工作。
我确实希望您还必须修复硬编码路径(将 moves-and-shows/public 替换为 public 等等)。
【讨论】: