Hacker News new | ask | show | jobs
by activepeanut 4895 days ago

  Otherwise you can just use git submodules.
I would recommend against it. They become a real pain down the road.

I wish I had something to suggest as a replacement. We're still trying to figure that one out ourselves. We just know we won't use submodules again. For now, we're manually managing disjoint repositories.

2 comments

The replacement is definitely the article's first suggestion: Cocoapods. Cocoapods is awesome and is rapidly being adopted by major repositories like AFNetworking, Kiwi, TTTAttributedLabel, MagicalRecord, and more: http://www.cocoacontrols.com/cocoapods

It has been super easy compared to git submodules.

Do you have a non-Apple-specific suggestion? We do cross platform development, so Cocoapods aren't an option.
Unfortunately, no.
what problems did you experience with git submodules?
You can't push your modifications to a submodule you don't own.

Also, you can only remove a submodule manually. There's no option to have git do it for you.

The first thing you should do is fork the repository and set up a remote for pulling in upstream changes.

There are a lot of useful libraries out there, but I find I occasionally need to make changes. Sometimes there are bugs; sometimes the maintainer has lost interest. I need to be able to pick up the slack when that happens.

Regarding pushing modifications: Why not fork the submodule to your own remote? That's what we do.