Merging only one file from a git branch (patching)

Daniel Ellis Research
Towards Data Science
4 min readDec 2, 2020

--

Say you have branches for different aspects of the same project and you want to merge only a single file (e.g. the configuration file). Short of copy-pasting all the changes by hand, how might you approach this problem?

Photo by The Nigmatic on Unsplash

The Problem

So we have a branch. This branch contains an update, bug-fix or enchantment and we wish to pass that on to all our…

--

--

Research Software Engineer specialising in High-Performance Computing and Data Visualisation. — PhD in Atmospheric Chemistry and Masters in Theoretical Physics.