I have a website I'm developing, it's github is https://github.com/samclark2015/Project-Emerald. I have the repo under my user folder in a subdirectory. Now when I push the site to github, it updates the tree as Sites/Project Emerald/... I need the contents of the project emerald folder in the root of my github repo. How can I change the root of my repo on my PC?
Asked
Active
Viewed 53 times
1 Answers
0
Since you just did your first commit in your GitHub repo, the easiest way would be to:
- delete your local
.git
directory you have under 'Site
' - recreate your repo locally, and force push it:
That would give:
# in Site/Project-Emerald
git init .
git add remote origin https://samclark2015@github.com/samclark2015/Project-Emerald.git
git add .
git commit -m "first commit, again"
git push -force origin master
You would then see in your GitHub repo directly:
PHP
SpryAssets
pictures
README
config.inc
...
Other alternatives are mentioned in "My Git repository is in the wrong root directory. Can I move it? (../
instead of ./
)"