How can I move all git content one-level up in the folder hierarchy?

前端 未结 9 2278
北荒
北荒 2020-11-30 22:09

I have a git repository whose structure looks like:

+--repo.git
|
+----+bootstrap.py
+----+buildout.cfg
+----+.gitignore
+----+webapp
|
+---------+manage.py
         


        
9条回答
  •  孤独总比滥情好
    2020-11-30 22:41

    I was able to get it to work simply by doing this from the destination folder:

    git mv webapp/* .
    

    It seems this doesn't work in the Windows shell (fails with an error Bad source), but it will work in Windows if you use the Git Bash shell, which expands the * wildcard.

提交回复
热议问题