Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Merging a Number of Git Projects Into One

DZone's Guide to

Merging a Number of Git Projects Into One

· Java Zone
Free Resource

Learn how our document data model can map directly to how you program your app, and native database features like secondary indexes, geospatial and text search give you full access to your data. Brought to you in partnership with MongoDB.

The question of why and how git is so flexible is a really interesting one. Is it a consequence of its having been around for so long? Or that it was forged, as it were, at the hands of people who were doing real, large projects (e.g. Linux)? I have argued here before that after using Git for a very short amount of time, the idea of going back to subversion is ludicrous. The main reason for that is that you will develop facility with the tool very rapidly, which is really important: when you have a tool to use, you are either going to get your lashes burned off a few times, and will continue on, like someone who‘s stooping in a mudpuddle waiting for the next shelling to begin, or you will actually feel the inputs produce consistent outcomes. Git gets a 10 on this score.

Anyway, I got to the point where I wanted to change our current project, taking it from a bunch of disparate projects to one project with a bunch of subprojects. It‘s finally possible with m2 in eclipse. The problem was moving the code without losing history. A dude on StackOverflow had the answer. I made a shell script out of it that you can download here.

Git Documentation on Subtree Merges

 

From http://www.jroller.com/robwilliams/entry/merging_a_number_of_git

Discover when your data grows or your application performance demands increase, MongoDB Atlas allows you to scale out your deployment with an automated sharding process that ensures zero application downtime. Brought to you in partnership with MongoDB.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}