[G2 Original Android Development] dr4stic:
I want to say first that I applaud that you're taking this step to build your own ROMs. And while this is not really the right place to look for building support, I wanted to offer some tips on building that may reduce the number of headaches you may or may not have, as well as encourage others to try doing the same. I'm going to assume that you're not a novice computer user (because you're actually attempting this and clearly got far enough to have installed a distribution of linux and run some of the steps), but that you are a novice developer and/or linux user because I have no proof otherwise. Please don't be offended.

As another forum member posted, the correct branch is cm-13.0 ... Following the steps for cm-12.1 from the CyanogenMod wiki is exactly what I did just 2 weeks ago when I decided to completely re-setup my build environment. The directions are more or less correct except for the branch name (as you learned) and there is a command that will fail because it no longer exists, and that's the "Get prebuilt apps" section which is meant for CM-11 or older.

The generally preferred distribution of Linux to use for building seems to be Ubuntu 14.04. I use the server version. I'm not telling you that because I like Ubuntu. In fact, I really really really dislike ubuntu. However it seems that the latest LTS (long term support) release is the easiest way to avoid issues with the builds. Just make sure to have it updated before you started building.

After you've sync'd your repo and gone through the process of your first build, you'll probably end up disconnecting from your build host because... well, sleep. Every time you re-connect you'll have to go through the process of sourcing the build/envsetup.sh and setting up the ccache. You should probably add an alias for those commands in your profile, or create a little shell script (aka, batch file), that you can run each time you log into your host that sets you up and prepares you for building.

I'm assuming, among other things, you want to cherry-pick changes from gerrit (review.cm.org) into your builds. This is easy. When looking at a change on gerrit, look for the change number. For example on this change it's 129322. Then, at the base of your repo (where you set up the CM sources), run "repopick 129322" (or whatever change number you've chosen).

You can't pick changes from a package or device you're not using. For example if you're on a d802 (intl G2), you can't pick a change meant for a d851 (t-mo G3). You'll have to download a patch and apply it manually. And 9 times out of 10, it won't apply cleanly and you'll have to resolve issues. This is something you'll have to learn about elsewhere as it gets pretty deep into gerrit/github. Your patches will get discarded every time you sync your repo, so make sure to keep track of the patches you're using and/or your personal work.

You'll need to "repo sync" your repo whenever you want to update your CM sources. You'll need to re-pick changes after syncing your repo.

I build with the "brunch d800" command. If you want to build just a boot.img, I believe the command is "mka bootimage" .... You don't absolutely have to do this, but I highly recommend it: between builds I reset my output directory to scratch by running "make clobber" ... this destroys the output of your previous build. Finally, the output of your work will be in the out/target/product/d800 (or whatever device you use) folder.

Finally, expect this to take a VERY long time. I'm running a VM server where I dedicate most of the resources to my build VM when it's running. This is a quad core (8 cores hyperthreaded) intel i7 (4770S) w/ 16GB of RAM (12GB dedicated to the VM) on an SSD. The first build (before the ccache kicks in) takes upwards of an hour and a half. The subsequent builds usually run 25-30 minutes or so depending on how much of the cache it's able to re-use. These are long build times, and I have some fairly fast hardware (I like to think). So don't expect this to go really quickly... chances are, it won't :)