I know this an old question but I recently went through the same experience and figured I would share what I learned.
To answer question #1:
I don't switch branches. You sync all of the code for whatever branch you want, and build that branch. For example, I have two: master and 4.3_r1, in a folder. To do this, I created two folders:
mkdir /Volumes/android_source/master
mkdir /Volumes/android_source/4.3_r1
To init and sync master, I type:
cd /Volumes/android_source/master
repo init -u https://android.googlesource.com/platform/manifest
repo sync
Then, to init and sync the 4.3_r1 build, I type:
cd /Volumes/android_source/4.3_r1
repo init -u https://android.googlesource.com/platform/manifest -b android-4.3_r1
repo sync
Before you build, change into the base directory and source the envsetup.sh file:
# cd /Volumes/android_source/master
# source build/envsetup.sh
including device/asus/deb/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/samsung/toroplus/vendorsetup.sh
including device/samsung_slsi/arndale/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
To answer question #2, once you've run envsetup.sh, lunch will be in your PATH. Then, tell it what exactly you want to build. For a debug build, tell lunch you want full-eng. You can launch lunch with no args to get a lunch menu.
mbpr15:Android awt$ lunch full-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.3.2.1.000.000
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-13.0.0-x86_64-i386-64bit
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
OUT_DIR=out
============================================
Now you're ready to build:
# make -j16
I have an 8 core processor, so I use -j16 when I run the build and it greatly improves the speed.
Hope that helps.