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.
- What's the -practical- difference between a Bare and non-Bare repository?
- Is it possible to use GitHub App to commit to bitbucket Repository?
- Git Merge two repositories that are years apart with thousands of conflicts
- SVN 1.3 VS 1.5 (latest)
- How to set GIT_DIR & GIT_WORK_TREE when maintaining multiple repositories
- ERROR: Workspace has a .git repository, but it appears to be corrupt
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.