1

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?

Sam Clark
  • 429
  • 3
  • 7
  • 12

1 Answers1

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 ./)"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250