DEV Community

Discussion on: Setting up a Git server in three simple steps

Collapse
 
shalotelli profile image
Sha Alibhai

My version of "lazy deployments" is SSH'ing in to the remote serve, git cloning the project from github and then pushing and fetching each time there's a change. If i set up the server as a remote and pushed to it instead, and then set up a post commit hook to restart pm2 for example (node process manager) can you see that introducing any additional risk? Seems easier especially in smaller projects rather than SSH'ing in to the server each time and fetching the latest changes. Im thinking the server would be something other than origin so that i could still keep a safe remote copy elsewhere...

Collapse
 
andrew profile image
Andrew O'Rourke

The remote is a bare repository, it doesn't have a working copy, so I don't think what you're thinking of is possible; at according to my (likely limited) knowledge of Git. 😿