简体   繁体   中英

Restructere Git Repository file structure

I have a Repository (fe myproject). There are two directories (fe subtask1 and subtask2). Now I want to add a directory between them, so that the structure is: myproject -> task1 and in task1 are my two other directories. I wanted to change this in locally and then add it to git but by doing this, all files are lost in git. Later, I want to add another repository to myproject, so that all my projects are in one Repository. I already tried it, but my files are either lost or do not work anymore. I already tried different things, but nothing really works. Can someone maybe help me? Thank You!

Before commiting, try staging the moved files using

git add .

git will automatically recognize that the files have just been renamed (in terms of their path).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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