简体   繁体   中英

Project file structure change and Git

I have a regular repo with only master.

I have been making commits ...

I needed to restructure the file paths of the entire project.

I commited the file path changes as normal.

How do I make the repo only show the new file structure. When I look at the repo I can see the files showing in both the old location and the new location?

Or should I just leave as-is?

you could try "git tag old_master; git checkout --orphan -B master "

then the old commit chain with the old file structure is still accessible from the tag 'old_master' if you need it. But only the new file structure will be on the new 'master' branch. As an orphan commit, it has no parents, and so starts a new commit chain.

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