Simple steps to setup git repo on remote web server and sync it with local workstation
May 13, 2020 10:50 pm by
ATS Staff
Steps to setup git repo on remote web server and sync it with local workstation
1. On Remote Web Server
cd public_html/site/
mkdir proj
cd proj
mkdir proj.git
cd proj.git/
git --bare init
cd ..
git clone /home/user/public_html/site/proj/proj.git proj
cd proj
touch index.php
git add index.php
git commit -m "init version"
git push
2. On Local Workstaton:
cd xaamp/htdocs
git clone user@server.com:/home/user/public_html/site/proj/proj.git
cd proj/
touch index.php
git add about.php
git commit -m "added about"
git push
3. On Remote Web Server
git pull