现在在我的github repo中,我有几个包的文件夹,但我想将它们放在一个名为" src。"的文件夹中。如何在不删除/重新制作回购或不得不进行大规模合并的情况下执行此操作?
目前:folder1,folder2,folder3,folder4
我想:src> (folder1,folder2,folder3,folder4)
答案 0 :(得分:2)
移动它们,git会接受它:
$ mv folder1 src/; mv folder2 src/; mv folder3/ src/; mv folder4/ src/
$ git add -A
$ git commit -m "Moved folders 1-4 to src/"
[master c5d9ecf] Moved folders 1-4 to src/
4 files changed, 0 insertions(+), 0 deletions(-)
rename {folder1 => src/folder1}/file.txt (100%)
rename {folder2 => src/folder2}/file.txt (100%)
rename {folder3 => src/folder3}/file.txt (100%)
rename {folder4 => src/folder4}/file.txt (100%)