A
A
Alexey2020-06-12 21:43:34
git
Alexey, 2020-06-12 21:43:34

How to upload files to a production server?

Hello! I just started working with git... Can you tell me how to properly make changes to the main server after development? For example, after I have added a new module for the site and dozens of files have been changed, 5-100 lines of code each, at different levels of nesting and in different directories, I need to somehow upload all this to the main server. To do this, I have to collect all the changed files together, manually copying and saving the directory tree in which they are located. This may take up to an hour. And the result is not always 100%. there is always a chance to skip it... And if some files are deleted, then this is generally a separate conversation.... This method, of course, is no good, tell me how to do it right?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arthur, 2020-06-12
@ar2rsoft

Use git, obviously) For this, two basic commands on a working PC and one on the server are enough.

A
aleks_web_dev, 2020-06-13
@aleks_web_dev

I'm not talking about it myself, but you need to do it like this
1 started the project and must initialize the git repository local command: git init (in the current directory)
2 then do: git add . this command tracks changes in files and folders
3 write git commit -m ' write what you changed, etc'
4 make a repository on github and paste it into the terminal: git remote add origin https://github.com/.....
it will be there a link to your repository is written
5 git pull and all your files on a remote server
In general, look at this
https://www.youtube.com/watch?v=JdUzxh8miQw&list=P...
https://www.youtube.com/ watch?v=DK2PsTcSFFM&list=P...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question