How to set up existing existing website to git?
If your site is already existing and you want to setup your site on git.
SO please follow the steps as shown below.
1) Go to the main directory where you site root
Like: cd var/www/host/yousite
SO please follow the steps as shown below.
1) Go to the main directory where you site root
Like: cd var/www/host/yousite
cd <localdir>
2) run these command git init
git add .
git commit -m 'My first commit message on git'
git remote add origin <Clone Url>
git push -u origin master
Note: Your Clone Url can be like this
git@bitbucket.org:yousitedirecoty/sitename.git
Or it could be like this to git clone
https://github.com/CompanyName/AppName
Now you can check you commit status on your git site.
Please comment if this works!
Comments
Post a Comment