This question has already been answered:

There are two sites: product and devel. Git is configured on the product. Devel - full product clone with all settings, incl. and git, but located on a different server. Question: how to properly configure git to devel so that you can merge it with the product?

Reported as a duplicate by members ߊߚߤߘ , user194374, Denis Bubnov , fori1ton , rjhdby 11 Feb '17 at 19:35 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • What does git mean for product? How configured? What does "right" mean? Without details it is impossible to answer the question - Krepver
  • Configured, then initialized and functioning normally. - andrey.t
  • More specific questions: 1. Do I need to change something in the git settings to devel (server name, branches, etc.)? 2. How to connect to the product? 3. How to update the devel with the latest edition of the product? - andrey.t
  • 2
    If I correctly understood the essence of the question, then you are here.stackoverflow.com/questions/428483/… - Krepver
  • The following point is not completely clear: is it necessary to clone the repository from production to devel, if all the project files have already been physically copied from production to devel, including the .git folder? How can I update the devel in this case if production changes? - andrey.t

1 answer 1

Understood, all thanks! Correctly configured a connection to a remote repository and it all worked.

Update: Details of what has been done:

  1. I deleted the wrong remote repository (since the git repository was physically copied from product , which is in turn tuned to another remote repository) with the git remote rm command.
  2. Added the correct ( product repository) remote repository with the git remote add command.
  3. In the file ~/.ssh/.config prescribed an alias for the product , so that each time not to enter the password when connecting to the product .
  4. I checked the connection using the git remote show command.
  • one
    @rjhdby What is such a "best answer" if this is the only answer? The presence of the word “thank you” in the answer does not automatically reply with the phrase “thank you.” This is because of the poor quality of the answer (it is unclear what it actually is “correctly set up the connection”, so it is unlikely that someone else will ever help ) it should be removed. - Regent
  • 2
    Author, could you tell us more about what exactly and how you set up? Then the answer will be useful to future readers. And get a good rating, I personally promise a plus. (In the meantime, the answer is not clear from the answer, so it is not actually the answer.) - Nick Volynkin
  • Added in response to more detailed information on the issue. - andrey.t
  • Promised plus. ) - Nick Volynkin