I have a git repository whose structure looks like:
+--repo.git
|
+----+bootstrap.py
+----+buildout.cfg
+----+.gitignore
+----+webapp
|
+---------+manage.py
Another variant of Sumeet's answer - in the repository directory above "webapp" execute following command:
git mv webapp/* ./ -k
-k - includes files which are yet not under version control, otherwise you get:
fatal: not under version control, source=webapp/somefile, destination=somefile
in windows you can do the below:
While you are in the child folder
for /f %f in ('dir /b') do git mv %f ../
The result all objects in child folder will be in the parent folder
Please note: some errors may raise when you have object in the child folder with name equals to the child folder
If you are using PowerShell you can run this command from your project root and it will place the content of webapp there.
Get-ChildItem .\webapp\ | ForEach-Object { git mv $_.FullName .\ }