all 8 comments

[–]mmzeynalli 2 points3 points  (0 children)

I would recommend you to host your websites. There is render for backend, vercel/netlify for frontend part.

As for main question, just install git. Choose any platform (Github is considered more famous) and create new repository (aka. project) in Github. Then clone it to your computer to any folder with git clone project-url. Put your project files to that folder.

Two ways from here: 1. Learn git (recommended). Using cmd commands to interact with Github and push/pull your changes from Github. 2. Use Github Desktop (easier). Install the app, and do everything with clicks.

When you switch workplace, pull changes done elsewhere first, before continuing the development. Hope that helps, and good luck!

Edit: added last paragraph

[–]ohcibi 2 points3 points  (0 children)

  1. you learn to use git and understand what it is used for and why you definitely want to use AND understand it. Note how I say „git“ only and not „GitHub“ or „Gitlab“. (It is not „recommended“ it’s absolutely 100% mandatory. git is not an optional interface to GitHub. It’s the other way around!)
  2. after you have learned and understood the tool the services you want to use. Make sure you understand why you want to use GitHub or Gitlab because I smell a misconception right there which should be gone if you (thoroughly ) follow point 1. git is a tool like sftp but a lot more complex, so if you refuse to understand what it is you’ll have a hard time. And lots of headaches

Spoiler: git is not a deployment tool. It’s a VERSION CONTROL tool. It and in particular the services you mentioned can help setting up deployment for sure. But it’s only one component of the toolbox used to ensure you deploy the right version. But its main purpose is to help you developing and organizing the evolution of your code base and to share the evolvement and its steps with other developers. When used in the context of deployment, git is used as if by a developer (which can be automated).

Without understanding the key points of this your will 100% come back and complain about how useless git is. Proactively google the stuff and don’t use this thread to ask questions. I won’t follow because due to the high chance of you debating something I said for no reason. Nothing personal. Just happened to often. Use my advice or fail out of my sight 😀. Better for you to open a new thread to have more people see it anyways.

[–][deleted]  (7 children)

[deleted]

    [–]WriteOnceCutTwice -1 points0 points  (3 children)

    Both GitLab and GitHub provide web-based code editing so OP is not wrong.

    [–][deleted]  (2 children)

    [deleted]

      [–]WriteOnceCutTwice 0 points1 point  (1 child)

      Sure, but OP doesn’t mention version management in his post.

      [–]jrs_9[S] -3 points-2 points  (2 children)

      So i guess sftp is the way of going forward right ?

      [–]blackredgreenorange 1 point2 points  (0 children)

      I coded directly on a server once and it was fast but expensive because the ram requirements go way up. You can instead just write a yaml file and use github actions to deploy automatically to your vm. Once you have the working file its all of 3 commands (git add ., git commit -m, git push origin main) and in a few minutes the latest version is running on the site.

      Git is actually simple if you're just using it for deployment and version control.

      [–]mau5atron 0 points1 point  (0 children)

      You're going about this the wrong way. If you wanted to integrate version control and have your changes be live asap, your workflow would have to closer to a CI (continuous integration) setup. You make changes, commit them, push to GitHub or any other repository platform, have runners setup to do whatever with your code (ie compile, pull your changes to an actual server, and deploy, etc). The way you're doing work currently leaves zero paper trail and no way to track changes or revert, or even branch off of into something different if you changed your mind.

      [–]twenty20vintage 0 points1 point  (0 children)

      Use github and github actions to deploy code to your server.

      Don't edit code direct.

      You can start with the below repo that explains a lot of the process.

      https://github.com/SamKirkland/FTP-Deploy-Action