Pankaj Pareek
Pankaj Pareek

Reputation: 3846

Change Git Repo Folder

I have created empty repo on github. On Our dev server, I have clone the repo on server root folder instead of public html folder.

When I tried to push all my files on repository, I am getting all the server files and log as well for commit but I only want to push my public html folder files.

Here my question is: How can I change the repository folder to public_html ? Or as github repository is empty for now, How can I remove the github link from server root folder and link again to public_html folder.

Thanks

Upvotes: 0

Views: 100

Answers (1)

CollinD
CollinD

Reputation: 7573

Probably the best best at this point would just be to go to wherever you have your git repo locally now and do a

(*nix)
rm -rf ./.git

(windows)
rd /s /q .\.git

That will remove the git repo from the directory. Then just go over into your public_html folder and reinitialize

cd public_html
git init
git remote add origin [email protected]:yourname/your-repo

Upvotes: 1

Related Questions