Android Repo

Managing project dependencies

There are lots of tutorials on how to initialise a repo but then what? The basics work quite well and use multiple processors to sync dependencies but I’ve yet to get to grips with doing a basic commit! It feels like you should be able to do an atomic commit across multiple repos but the curses interface goes all weird and I gave up for now. It’s also really annoying searching for information on something called “repo”! [Read More]

git submodules

Managing project dependencies

Are they really that bad? [Spoiler alert: yep, worse than you can imagine.] Adding submodules Clone an existing repo and update the submodules - note the hashes against folders in the repo. git submodule init git submodule update Add a new submodule by HTTPS. $ git submodule add Cloning into '/home/deant/deps-submodules/dft'... remote: Enumerating objects: 1417, done. remote: Total 1417 (delta 0), reused 0 (delta 0), pack-reused 1417 Receiving objects: 100% (1417/1417), 17. [Read More]

git subtrees

Managing project dependencies

A mono repo under the hood. See the Atlassian documentation. Create your outer repo and add something to it just to have history – otherwise you’ll see this unhelpful error: fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree. # Make history touch && git add . && git commit -am "create empty readme" && git push # Add subtree git subtree add --prefix=cpp/ git@gitlab. [Read More]

Managing project dependencies

It’s difficult to choose a dependency management tool without first-hand experience, so I’m using a few to manage my own projects.

tl;dr: currently using git subtrees.


To be evaluated


Subversion to git migration

Equivalent commands Commit and push to server svn commit -m 'blah' git commit -m 'blah' git push Checkout svn checkout <repo> git clone <repo> Offline working This doesn’t exist in Subversion. Unless you’re running your server locally. git still allows you full config control (bar pushing to GitHub) without a connection. Which is essential on the train where I do my best work. I think many colleagues would argue that they always dev at their desk so this is irrelevant. [Read More]