So I have my local computer - where I've updated my (html/js/css) code, github (where I've pushed the updated code already by doing a git add + git commit + git push origin master) and then the server of the actual website which the code is for.

I've connected to the server via the command line terminal. I've already previously cloned the code to the server (by running the command git clone [REPO URL]) while logged in to the server via SSH, so the (un-updated-)files are there.

But now that I've updated the code, and pushed that update to github, how do I now update or push the repo/code/updated-github-code to the server???

I'm currently looking at the terminal with [~]#

^ showing. I tried to git clone [REPO URL] again, but then I get the msg: fatal: destination path 'name of my file' already exists and is not an empty directory

Am I missing or overlooking a step? Well obviously I am but I could use some help please. Like I said I'm trying to update the code to the server so the actual website will reflect the changes I made to the code and so everything is in sync (local code, code pushed to github and hopefully/eventually the code on the server/website).

I am just learning this obviously, so go easy on me (I've spent almost the entire day learning to connect to the server via SSH in terminal)...

Also, feel free to correct my terminology...

1

There are 1 answers

3
Hunter Jones On BEST ANSWER

Pull from github while ssh'd into the server using the link from the github repo "copy to clipboard" button on the web interface. If that doesn't work you could try wiping the repos folder on the server and cloning from scratch. But use that option with caution if downtime is unacceptable for this particular web app.