There seems to be a lot of way to merge two #git repositories into one repository without losing file history. Here is another straightforward method.

This method do not use #submodules or #subtree merges. it uses regular merge operations.

  1. Create a new empty repository New.
  2. Make an initial commit because we need one before we do a merge.
  3. Add a remote to old repository A.
  4. Merge A/master to New/master.
  5. Make a subdirectory folderA.
  6. Move all files into subdirectory folderA.
  7. Commit all of the file moves.
  8. Repeat 3-6 for another repository.
mkdir result
cd result
git init
touch README.MD
git add .
git commit -m "added readme.md"
Step 3 to 6
git remote add -f A https://github.com/A.git
git fetch --all
git merge --allow-unrelated-histories  A/master
mkdir folderA
git mv -k * folderA
git commit -m “moved A files into subdir folderA”
comments powered by Disqus

You might like also

Jincor Targets to Bring Smart Contracts to 10,000 Businesses by the end of 2018
Even though everyone is talking about smart contracts and their advantages over traditional paper contracts, only a handful of people are addressing the elephant in the room: most of the businesses don’t know how to use smart contracts yet. Jincor is among those few who are trying to make smart contracts and other blockchain technologies more accessible to modern businesses. And anyone can chime in by joining the project’s public token sale, which starts today, on the 1st of December. Jincor is a …
1 Days ago
No Thumbnail was found
This tutorial will show you how to accept Bitcoin on a website with SSL signed payment requests using Electrum, required is a shell access and enough permission to install electrum A webserver serving static HTML A SSL certificate (signed by a CA) Electrum version >= 2.6 Install dependencies: sudo apt-get install python3-setuptools python3-pyqt5 python3-pip Install Electrum: sudo pip3 install https://download.electrum.org/3.0.3/Electrum-3.0.3.tar.gz then run on your server electrum create electrum daemon start electrum setconfig ssl_privkey /etc/letsencrypt/live/xxxxxx.com/privkey.pem electrum setconfig ssl_chain /etc/letsencrypt/live/xxxxxx.com/cert.pem  electrum setconfig …
3 Days ago
No Thumbnail was found
Here are the list of tips and tricks to develop solidity in a modern way (understand back to 2017 year :-) ) IDE Support I recommend you to use the excellent Jetbrains Webstorm or Intellij IDEA with the folllowing free plugins: Intellij-Solidity see https://github.com/intellij-solidity/intellij-solidity Solidity Solhint Plugin allow to enable Solhint inspection capabilities in your project. It highlight of warnings / errors found by the linter in editor during code modification. Refactoring in Javascript is excellent but still not supported in …
18 Days ago
No Thumbnail was found
work in progress - daily update Feedback is welcome in comments section, or through my contact form click on map, to view in full size …
55 Days ago
How to: Securing your Crypto  Assets
work in progress - daily update - a more convenient online version is also hosted at https://github.com/cedricwalter/Securing-Crypto-Assets  Pull requests are welcomed! Feedback is welcome in comments section, or through my contact form click on map, to view in full size …
55 Days ago
Big Bang Blockchain: La seconde révolution d'internet de Stéphane Loignon
La blockchain est annoncée comme une révolution technologique, économique, politique et sociétale aussi puissante qu’Internet. Cette « chaîne de blocs » promet d’être l’outil incontournable de demain. À quoi sert la blockchain ? Cette nouvelle technologie permet avant tout d’envoyer de l’argent en ligne sans intermédiaire : ni banque, ni compagnie de carte de crédit. Elle pourrait bouleverser la finance, l’assurance et le transfert d’argent tout en étant le moteur d’un vaste mouvement de décentralisation de l’économie numérique. Grâce à elle, certains rêvent …
73 Days ago
Blockchain definitions
  Blocks & Transactions Transaction data is permanently recorded in files called blocks. They can be thought of as the individual pages of a city recorder's recordbook (where changes to title to real estate are recorded) or a stock transaction ledger. Blocks are organized into a linear sequence over time ("Miner" or "Worker") also known as the block chain). New transactions are constantly being processed by Miners (into new blocks which are added to the end of the chain and …
74 Days ago
No Thumbnail was found
DevFest is the biggest Google tech conference in Switzerland. All about machine learning, programming, emerging technologies and much more!  GDG DevFests are large, community-run developer events happening around the globe focused on community building and learning about Google’s technologies. This year i will be helping and organizing some of the side activities between the talk session. And i prepared a lot of stuff, enough for 11 screens! _auto_generated_thumb_ _auto_generated_thumb_ Not everything is on pictures, NES and SNES classic are missing …
79 Days ago
Mining FeatherCoin on GeForce 1080 Ti
Feathercoin is a powerful open source digital currency with monetary properties linked to Bitcoin, Litecoin and a myriad of countless alt coins, but under the hood is something very different. Feathercoin is a highly upgraded and customised piece of software compared to the Bitcoin and Litecoin protocols. Based from Bitcoin, Litecoin evolved, from which Feathercoin was born, with the intent to expand, experiment, and build onto the blockchain technology in a manner open to all for participation. Just over one …
80 Days ago
No Thumbnail was found
XMR-Stak is a universal Stratum pool miner. This is the NVIDIA GPU mining version; there is also an AMD GPU version, and a CPU version. Docker® containers are often used to seamlessly deploy CPU-based applications on multiple machines. But Docker Engine does not natively support NVIDIA GPUs with containers. I have dockerized the Nvidia GPU-mining version, so it is now running in nvidia-docker. Containerizing GPU applications provides several benefits, among them: Reproducible builds Ease of deployment Isolation of individual devices Run across heterogeneous …
101 Days ago