On the production server I use git as Fork or clone? what is the best structure for an active project?

Asked

Viewed 82 times

0

my question is how best to use git on a production server.

for example I have a project in git but I don’t know if it’s better to publish the project on the server via Fork via clone, if it’s nice to keep a unique branch?

Thinking I want to keep frequent updates to my production project and always keep up to date with git.

1 answer

0

The best way to publish an application is not by Git, but by an CI (Continuous Integration) process. In fact, CI, will solve only build (build), run tests, package, etc... and an automatic deployment process will do the installation in the environment for you.

It may seem more complex, but the simple action of pushing code to a server causes some problems to arise:

  • Reference objects in the code repository: compiled languages usually have libraries (libs) as reference, already in nodejs, for example, and these binaries should not be in the code repository, the compilation process is responsible for accessing it and making them available for compilation, and after, package together with the generated torque.
  • Secrets or environment settings: Database passwords and other keys, or even service Urls are different in the production environment compared to the development environment. An automated deployment process will make this switch.

Anyway, the benefits are diverse, so introducing an IC brings many gains to the process. There are several options:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.