user1383163 user1383163 - 4 months ago 24
Git Question

How do i remove a superfluous parent directory

I have a directory structure like this

-foo
-bar

i actually want the repo to be the following:

-bar

how do i remove foo without having to delete and recreate the repository?

Answer

You can use git mv -> Move or rename a file, a directory, or a symlink

git mv source_dir/ destination_dir/