how to copy one or more files from one git repo to another and keep the git history

how to copy one or more files from one git repo to another and keep the git history

Recently ran into the issue of needing to copy a file from one repo to another, while maintaining the git history of that file. Spun me for a loop. I was able to find some examples and decided to write out the process here. Here’s the gist if you want to cut through the noise. background The question is pretty straightfoward; how do you copy a file from one git repo to another and maintain history?

code

Github GitHub coinmarketcap-exporter - Prometheus exporter for coinmarketcap. Docker bcawthra - Personal Docker container space.