search

Home  >  Q&A  >  body text

How to choose between using git, hosting it on your own VPS, or Coding.net?

Beginner to learn git. Not understanding the differences between various ways of working. I hope you guys can help me compare.

Three places to put code: VPS, Coding.net hosting, local machine

There are three methods now:

  1. VPS creates a working directory. On this machine, using git clone
    directly on the working directory requires an extra step of git reset --hard master. This will not be automated

  2. VPS has a repo, a working directory, and creates hooks. Using this machine, you can use git-hook

    to submit the repo
  3. Create repo in coding.net, create webhook, and automatically git pull in vps.
    This can use the provided webhook

This is the method I have learned so far. Are these three methods the most efficient?

黄舟黄舟2813 days ago696

reply all(3)I'll reply

  • 世界只因有你

    世界只因有你2017-05-02 09:31:31

    Actually, what you want to ask is how to simply perform continuous integration/deployment, right? It is safer and simpler to host the code on a third party and use webhooks.

    If your code needs to run unit test or build before deployment, you may need CI. There are many free CIs available, and most of them also support auto deployment. For example: travis-ci

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-02 09:31:31

    Static files are served directly using coding pages. Nodejs uses PM2 for deployment.

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:31:31

    Is there any necessary connection between learning Git and buying a VPS?

    reply
    0
  • Cancelreply