I tried this
git checkout --orphan newfeature/lk1
Inside I have
A,B,C....
my goal was delete all except the one,A
find . -name A -prune -o -print0 | xargs -0 rm
It did not work for me. I am using GitBash. What should I do?
Use a pathspec [1] to match on all except A/.
git checkout --orphan branch
git rm -r -f -- ':!A/'
git commit