Having the exitng git repo with this structure:
+
|
+-- bin/
|
+-- html/
We want to move everythihng under src
directory like this:
+
|
+-- src/
|
+-- bin/
|
+-- html/
The git command to use:
git filter-branch --prune-empty --tree-filter '
MOVE_TO="src"
mkdir -p ${MOVE_TO}
git ls-tree --name-only $GIT_COMMIT | xargs -I files mv files ${MOVE_TO}
'