Articles on Subtree

Git Subtree Survival Tips

March 17, 2016 at 12:00am in git, subtree
by Roy Willemse (6 min read)

Sometimes you want to share files across multiple Git repositories. In our case we wanted to share Jenkinfiles and Gradle scripts, which were maintained in a different repository. Our initial copy-paste methodology started to become burdensome after the first dozen projects. This was expected, of course. So we went looking for alternatives and (after rejecting Git submodules) started to experiment with Git subtrees. In this article I’ll share some tips to enhance your experience.