Edit Page

Git Pong

Git Pong involves pushing code back and forth over related git branches on remotely accessible git repos such as those on Github and BitBucket. This allows the pair partners to make for quick driver/navigator swaps when pairing using screen share. First you need to ensure that all parties have a fork of whatever repo is being worked on. Then make sure that everyone has each other added as a remote, e.g.

**git remote add **

use git remote -v to check that’s set up correctly. Then to get your partners code use the following:

**git fetch **

**git checkout /**

**git checkout -b **

then to sync after your partner makes additional changes:

**git pull **

It’s also great to have tab completion for branch names, and branch names displayed in your command prompt:

See examples in the following repos: