can I move a git repo from a subfolder of the folder it should be in

Sorry for the newb question. I created my git repo in a subfolder of the one I meant to. There is only one empty file in the respository. Or should I just kill that and clone the repository from github into the proper place?

Thanks very much in advance.


  • repo init UnicodeDecodeError on Ubuntu 13.04
  • How to rename a remote git branch name
  • XCode4 add Repository Host Unreachable?
  • Git S3 KeyError
  • What is the value-add of Repo (+git)?
  • Pull remote branch into local repo with different name?
  • How to concatenate two git histories?
  • Restructuring Files in Git Repository
  • One Solution collect form web for “can I move a git repo from a subfolder of the folder it should be in”

    You can clone again your repository as you said, but keep in mind that any local changes that you have not pushed to the remote will be lost: If you did not push them you will not get them back when you clone your repository again.

    You can also move your files. If your directory structure is something like this:


    where the folder containing the repository should have been “IntendedName” instead of “Subfolder”, you can just move all the files inside “Sulfolder” to it´s parent (including the hidden directory .git) and then remove “Subfolder”. In this case, any local changes will be kept, even if you did not push them.

    Git Baby is a git and github fan, let's start git clone.