Skip to content

Instantly share code, notes, and snippets.

View sumnermic's full-sized avatar
🎯
Drinking coffee

Michael Sumner sumnermic

🎯
Drinking coffee
View GitHub Profile
@mediabeastnz
mediabeastnz / Staging&ProductionUsingGit
Last active December 1, 2022 14:47
Staging and Production Server using Git.
If you are running a large website where you will need to test new features on a seperate url before pushing them live then the following instructions are for you ;)
For this example imagine your url is apple.com and you want a development/staging site on a subdomain which is dev.apple.com
#Setup#
1. First thing you'll want to do is go ahead and create your website in plesk and add the subdomain dev.apple.com at the same time.
2. ssh into the server e.g. $ ssh username@ipaddress
3. Once logged in cd into the private directory (this will be where all git repos are stored) e.g. $ cd ~/private
4. Create the main repo e.g. $ git init --bare apple.git
5. Now to clone this new repo on your local machine. $ git clone ssh://username@ipaddres/~/private/apple.com