Question

digital ocean doesn't update the github repository when i type git pull

i have an web app deployed on digital ocean and when i type git pull to update the app it doesn’t update. I have an api on node js and client app on angular 6, i have nodejs installed on digital ocean server and also git.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

it’s almost similar to a mern app right

cd <in the code directory>

then

git pull <github_url> master

Greetings!

If you are running a nodejs app you may need to restart the application after pulling the latest code. The steps for this are relative to how you have it set up, so I’m unable to provide those. It may also be possible to have your application check for new code on a regular interval, which then reloads portions of the application without requiring a full restart. This article seems to outline a method for doing that:

https://codeforgeek.com/2014/09/update-code-without-restarting-node-server/

Jarland