Motivation


Figure 1

Piled Higher and Deeper by Jorge Cham, http://www.phdcomics.com/comics/archive_print.php?comicid=1531

Figure 2

Changes Are Saved Sequentially

Figure 3

Different Versions Can be Saved

Figure 4

Multiple Versions Can be Merged

In-browser sessionIn-browser session


Figure 1

BitBucket example screen

Configuring Git


Our first repo


Figure 1

git staging and committing

Undoing things


Branching and merging


Figure 1

Linear git repository

Figure 2

Merging branches
(Source: https://twitter.com/jay_gee/status/703360688618536960)


Figure 3

Git collaborative graph

Figure 4


Figure 5


Figure 6


Figure 7


Figure 8


Figure 9


Conflict resolution


Figure 1


Figure 2


Sharing repositories online


Figure 1

Create new repo on bitbucket

Figure 2

Bitbucket repo setup page

Collaborating with git repositories


Figure 1

Bitbucket repo fork

Figure 2

bitbucket pull request menu

Figure 3

bitbucket pull request menu

Figure 4

Person 1: 1. One person from each team should create a new Bitbucket repository named ‘favourite-things’. 2. Copy the supplied git clone command to create a local copy. 3. Locally, create a file named README.md and list a few of your favourite things within it. 4. Use git add, git commit and git push to move your new file back to the remote. 5. In the Bitbucket repository, click ‘Repository Settings’ in the lefthand menu, followed by ‘Repository permissions’. Use the form to give “User access” with “Write” permissions to your team member(s). bitbucket pull request menu
6. Share the repository link to your team member(s).


Making git citable


What to not add to Git