0

We have a configuration file with a lot of standzas. Development team has changed some of them. Can I use the commits they've done and migrate the change to production environment?

Example: [server01] ... ... country=UK #this's changed from United Kingdom

[server02] #unchanged ...

[server05] enabled = true #this is changed from false

...

server01 and server05 are changed in one commit. I need to push the changes to production chaning the stanzas of server01 and server05. Is there a quick way to do this?

StoneRock
  • 3
  • 1
  • I think the use of the word "repository" is making this question confusing. Do you really have different Git *repositories* for each environment? (That would be abnormal.) Or, maybe you have different *branches* for certain environments? (That would be common.) For example, maybe you have a `develop` or `staging` branch which deploys to some test servers and a `main` or `master` branch which deploys to some production servers? Also, even if you do mean "branches" instead of "repositories", it's still unclear what you're asking. Are you asking how to merge commits from one branch to another? – TTT Mar 24 '22 at 13:56
  • Hello sir, I have different repositories for each environments. It's too complicated to move each minor changes from here to there and it's very easy for manual efforts :( – StoneRock Mar 27 '22 at 01:45
  • In that case I believe this is probably a duplicate of another question. Basically you need to setup multiple remotes. Does this answer your question? [How to copy commits from one Git repo to another?](https://stackoverflow.com/questions/37471740/how-to-copy-commits-from-one-git-repo-to-another) – TTT Mar 27 '22 at 16:00

0 Answers0