move all files of current directory into subdirectory and maintain history

前端 未结 7 1096
不知归路
不知归路 2021-02-05 03:00

How can I move all the files of my current directory into a new directory and retain the history.

I have tried:

git mv . old_app

But I

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 03:50

    So, I got into the same problem and what did the job for me was

    for file in $(ls | grep -v 'yourfolder'); do git mv $file yourfolder; done;
    

提交回复
热议问题