Github Collaboration Guide

MARIO
4 min readOct 2, 2021

One way I recommend creating a project with a team is to use this Github Collaboration. This method is suitable for those of you who are new to working as a group and don’t know where to start building projects.

Step 1 ~ Initialize a New Project

Go to Github and click ‘+’ button in the top right corner and select ‘New repository’.

Then fill out the ‘Repository name’ and the ‘Description’ fields. Keep it ‘Public’ and do not change anything else. Click ‘Create repository’

Next you’ll see the setup page. These are the instructions for connecting the Repo you just created in Github (Remote) to the directory you created in your terminal (Local).

Paste the lines in the red box line by line starting with “echo…” into the terminal while you’re cd’ed into the directory you just created locally. Your terminal should look like this when you’re done:

This adds a ‘.git’ folder to your repo, connects you to your remote Github Repo and also gives you a ‘README.md’ file. And if you go to your Github Repo page, you’ll see the ReadMe that you intialized with and the reference to the first commit you made.

Now let’s get this Repo up to date. Go back to your terminal and git add, git commit, and git push:

Now check out your repo. It should have all the files you created your local directory with along with a new commit id (86fccf0):

You’re initialized and ready to start working!

Step 2 ~ Setup Your Team

You’re a team player, so you’re going to need to add your team to your repo so they can collaborate. Once your team is added as collaborators they’ll be able to push, merge, and a ton of other destructive things so make sure you’re only adding your teammates.

Click on the “Settings” tab of your rep, then “Manage access” then search for Github users and add them by clicking “Add people”:

Click the collaborator then click ‘Add [collaborator name] to this repository’.

They’ll receive an email letting them know you added them and will be listed as a collaborator.

If you’re a collaborator, go to the Github Repo page, Git Clone the project, and cd into the directory. Don’t fork it! Forking will copy it in a new Repo to your Github page, but you don’t want that — you want to collaborate on the same Github Repo with your teammates.

$ git clone https://github.com/M-AR-IO/collabRepo.git$ cd collabRepo

And now you’re ready to collaborate!

Additional

The repository above is only for this demo guide, for examples of repositories that have several collaborators already joined, see the repo https://github.com/M-AR-IO/CollaB. Click tab ‘Insight’ then ‘Contributors’ and you will see the collaborators who contributed to the repository.

--

--

MARIO

Mahasiswa Informatika di STMIK AKAKOM Yogyakarta