I have a git repo like
repo
/sub-project1
/sub-folders and files
/sub-project2
/sub-folders and files
/sub-project3
/sub-folders and files
i want to remove
/sub-project1
/sub-folders and files
and create a new repo with all the git history related to that folder and files need to be also included.
main consideration is keep only the history related to that folder only and remove all other unwanted history
what is the best way to do it?
keep only the history of the desired folder. need to use following command
git filter-branch --tag-name-filter cat --prune-empty --subdirectory-filter <folder-name> -- --all