Git and GitHub – Example of Using GitHub in a Project – Collaboration Part

[Click images to see the large version]

Step 6. Creating GITHUB Accounts Other Users

Every user that needs to work in the repository will need to create a GITHUB account. Follow Step 1 to create new accounts. However, instead of creating a new repository they will clone the one that was created in step 2.

Step 7. Adding Collaborators

The owner of the repository will have to login to github.com to add the the github ids of the collaborators created in Step 6.

Login and select the repository.

image001 image003

Then select settings and then collaborators.

image005

Type the GIT ids of all collaborators and press add collaborator.

image007

Step 7. Collaborators clone the GITHUB repository

After creating their own GITHUB account, installing the GITHUB tool, and having been added as collaborators, the students will need to clone their repository.

First the students will have to set the path of the folder where the repository will be cloned to.

image009 image011

After that, they clone the repository by finding first the repository to clone in the the filters dialog.

image013

The repository will be cloned and the files of the repository will be downloaded in the selected folder.

Step 8. Editing the shared commisson.py file

The student will browse to the folder where the repository was cloned and the student will open commission.py using usng Canopy, IDLE or a any other editor.

image015

In this picture we show adding the Refrigerator’s commission using Canopy.

image017

Finally, save the file.

Step 9. Collaborators push the the files to the repository.

After modifying the file and saving it, the collaborator will go to the github tool and open it.

image09

Then, commit the changes of the new refrigerator commission function and then push them to the github repository so other collaborators can see the changes.

image021 image023

After the changes have been pushed you will see the summary of the change as part of the History of the repository.

image025

Step 10. Other collaborators will get the changes.

Other collaborators will get the changes by using the github tool and syncing the changes. Open the github tool and select the repository. Then press Sync. That is going to bring the latest changes.

image027 image029

All the collaborators will need to sync the changes of each other after they have been submitted.