Hi everyone!
I made a mistake creating a repo in a wrong folder.
I created a wordpress project and I decided to create a repo of my custom theme but after some days of work (shame on me) I realised that the path of the repo is the entire project, including the wp-core files / wp-admin files.
Now I'd like to move the repo parent folder / container to a subfolder of the current one.
Is there an easy way to do that?
That's my tree of the repo
Hope everything is clear.
Can anyone have some ideas how to do that?
Thanks to everyone!
I'm using Sourcetree last version.
I think it all depends on whether you have committed changes into your repo for the current structure and whether you need to be keep that history?
Since the name of the local folder containing the repository is not a key bit of information (i.e. it just holds the .git folder and the working copy) you should just be able to copy all of your files and folders up one level, leaving the .git folder in place.... if that makes sense.
e.g. from
up to
when you come to commit the repo you will find all of the higher files/folders 'deleted' and the ones you want moved up a level
So essentially you just advice to move the git-related file (folder + hidden files) into the folder I want. Then it makes a check with the new folder and it will find that some files are missed and it will interpretate as deleted.
For me I think is fine because I made changes only into the WP content folder and I'm still on the master brach so I don't think there will be problems.
Thanks for the reply, I'll try asap.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suspect the end result will actually be the same, but personally, I would actually have cloned the repo into a new clean folder with an extra parent level and then moved everything apart for the .git folder one folder higher.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.