How do I place my entire WordPress installation under git control? I am using Github on a Mac computer and I need to push all my work to a remote repository.
1 comment
Comments are closed.
How do I place my entire WordPress installation under git control? I am using Github on a Mac computer and I need to push all my work to a remote repository.
Comments are closed.
So the process is straight forward, but don’t forget to include a dump of the database to your repository.
say you have the WordPress setup on /Users/yourHome/theSite, then:
cd /Users/yourHome/theSite
git add .
git commit -m 'Your commit message
git remote set-url origin https://example.com/remote/sample.git
git push -u origin master
please note I’m assuming you already have git repo on the site location. otherwise you need to initiate on in the location before the step 2. lest say as step 1.5 🙂
git init
so after having the db back up ready, you have to: