Session 2: Bob joins Alice to work together

[bob@sidp ~]$ git config --global --list
user.name=Bob the Builder
user.email=bob@builders.com
color.ui=true
core.safecrlf=warn
core.autocrlf=input

Bob gets a copy of Alice's repository: clone, remote, branch

cd ~/repositories
git clone --origin alice ~alice/repositories/cci_cm_demo_src

git branch        # view local branches
git branch -r     # view remote tracking branches
git branch -a     # view all branches

Bob retrieves changes made by Alice: fetch, pull

git fetch alice # updates remote tracking branches only
git pull        # merge changes into active local branch

Alice integrates changes made by Bob: remote add, remote show

Alice adds a remote alias to Bob's repository:

git remote add bob ~bob/repositories/cci_cm_demo_src
git remote -v
git remote show bob

Alice can pull in Bob's changes any time as follows:

git fetch bob         # update remote-tracking branches
git pull bob master   # merge `bob/master` into active local branch