How do you delete part of an existing git project and become a new one?

the gitlab, environment is private, assuming that existing project A has two files A/a.txt , A/b.txt , and has a series of operations such as commit and merge.

now a new project needs to be created due to business requirements, but the new project only needs A/a.txt , and the previous git operation record needs to be kept.

how would it be reasonable to implement?

Git
Feb.28,2021

I have never encountered this problem. After thinking about it, the train of thought should be:

  1. Clone from the original warehouse to the local: git clone original warehouse
  2. Delete b.txt
  3. hold, submit: git add & & git commit
  4. push to the newly built warehouse: git push-u.

is it supposed to be like this? Not to mention git init and git remote add .

just experimented on Github, you can delete the specified file or keep the submission record.

With

full of coquettish operations, you can convince users to open a new git library instead of the previous record of git operations. The old version is left on the original git. If you really need to check the git records, you can check the old version of the warehouse. (when you can't change the code, you can try to change the requirements

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be76ca-13db9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be76ca-13db9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?