L
L
leMar2012-10-25 01:38:31
git
leMar, 2012-10-25 01:38:31

How to synchronize production and local version of the project?

There is a production server and a local version. The usual way is to make a repository on the github, push the production there, and then clone it from the github to the local machine. Is there some other way to not pull all the files from the repository, but only those changes that are not on the local machine? Thank you.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
C
CKOPOBAPKuH, 2012-10-25
@CKOPOBAPKuH

> push production there
in this place you have an organizational error. the flow of changes should go from the developer to production, and not vice versa.
> make a repository on github
and why is this? git init and forward via ssh, without any github
> Is there any other way to
rsync
but seriously, the biggest problem is that you generally have the task of transferring changes from production to the repository.

V
Vladimir Chernyshev, 2012-10-25
@VolCh

If I understand the situation correctly and there are no reps at all, then we do git init on the local, push initial commit with the old version to the rep, do git clone on the production (to a separate folder), copy the actual production there, push to the rep, on the local we do pull. As a bonus, we get a commit with a difference between the old (local) and new (production) versions.

C
CKOPOBAPKuH, 2012-10-25
@CKOPOBAPKuH

understandably. the author of the question does not listen to what they are told, walks around with a fictitious problem (or tries to talk about a fictitious problem thinking that it will solve his main problem, but not talking about the main problem), and everyone who tries to help him is minus.
I'm offended. that there are such people somewhere near me.

S
Sergey, 2012-10-25
Protko @Fesor

Usually synchronization goes from the repository to production. The way for the lazy is to lean from the repository on the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question