Answer the question
In order to leave comments, you need to log in
How to merge remote repositories into one on GitHub?
Hello.
Background:
It so happened that on one of my projects I spawned a dozen backups of droplets on DigitalOcean, where I was working with one single template. Some settings in the CMS were changed, different CMS modules were edited in different droplets, something was edited, added and removed somewhere. Then the project was put on pause, a few months passed and then I decided to combine them to save the budget. But, of course, I don’t remember where which versions / edits were. So I wanted to use the git to combine all this zoo into one repository, with which it will be possible to continue this project later, without losing anything now. I tried to merge repositories in some ways found on the Internet, but somehow it doesn’t work out very well.
The main thing:
In total, there are n droplet backups, a premium github account, and a desire to compare each file on all droplets (except those included in .gitignore, of course).
Throw a tutorial at me or tell me how I can combine them into one repository on GitHub?
Thanks in advance! :)
Answer the question
In order to leave comments, you need to log in
For each version of the project, start your own separate branch in the git project
and then compare them with each other as much as you like
git init
git remote add origin https://github.com/main/main.git
git remote add droplet_1 https://github.com/droplet1/droplet1.git
git remote add droplet_2 https://github.com/droplet2/droplet2.git
...
git remote add droplet_n https://github.com/dropletn/dropletn.git
git fetch origin
git fetch droplet_1
...
git fetch droplet_n
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question