Create a GitHub repository and collaborate

Fetch upstream, contribute, and create issue

Sparisoma Viridi
8 min readJul 16, 2023

A repository, or sometimes GitHub users shorten it to “repo”, is a directory or storage space where a project can live, where it can be local to a folder in a computer or it can be a storage space on GitHub or another online host (Orsini, 2013). It contains a collection of files of various different version of a project, where these files are imported from remote repository into local repository of the user for further updation and modification in content of the files (Abhinav96, 2019). At least there are two ways to create a new repository, the first is by visiting GitHub user profile page, https://github.com/username and create new repository using New button (McKenzie, 2020) or now the + button, and the second is using command line (Broman, 2018). Steps using the first way and an example to collaborate between two users on a repository in editing a file are given here, and also how to use Issues GitHub feature for communication.

Create new repository

Find + button and choose New repository.

Type name for new repository and error message will be displayed if the name is already taken for an existing repository, e.g. https://github.com/dudung/lecture-notes.

Change the name to unused one, e.g. a-new-repo.

Continue by filling optional Description.

Choose Public and check Add a README file option.

Click menu below Choose a license, scroll down, and chose MIT License (or other that suits the project).

Then click the green button, Create repository.

Wait for the process of creating new repository.

The new repository now available at https://github.com/dudung/a-new-repo.

Fork repository

From previous figure there is not any forks or 0 forks. Suppose that there is other user want to collaborate by forking the repo.

The user should log first and her profile shows that there is not yet fork of previous just-created repo.

Go to the repo and clik Fork button.

Change any required information and click Create fork button.

Wait until fork of the repo ready.

For of the repo now is available at https://github.com/rrkurnova/a-new-repo. Notice that

Click 1 fork icon.

Click Switch to tree view.

The relation between two repos is shown. Visit user profile page.

It can be seen now that it has two popular repository and the last one is the one that has been forked recently.

Update upstream

After fork a repo user will see that the forked repo is up to date with the source repo.

Above message tells that the branch, rrkurnova/a-new-repo repository is up to date with the dudung/a-new-repo repository.

Suppose that owner edit the README.md file by accessing the address https://github.com/dudung/a-new-repo/edit/main/README.md.

Type following line

## 16-jul-2023
Today this repository is created.

and then click Commit changes button.

Edit Commit message and also Extended description if necessary, then click Commit changes button.

Now content of the README.md file is modified. Now the collaborator will see updated message.

It shows that this branch is 1 commit behind from source repository. That means it does not have the newest update.

Click Sync fork menu and choose Update branch button.

Wait for the updating process.

Now it is updated. Scroll down a little bit.

Compare the content of README.md file before and after branch updating.

Update fork and create pull request

Collaborator can also modify her repository, e.g. https://github.com/rrkurnova/a-new-repo/edit/main/README.md.

Add and the collaboration begins. and click Commit changes button.

Click Commit changes button after provide required information.

Now the content is updated. Go to https://github.com/rrkurnova/a-new-repo.

Notice that the branch is 1 commit ahead of source repository.

Click Contribute menu and click Open pull request button.

Fill message and click Create pull request button below.

Now owner is informed about the modification suggested by a collaborator.

Review pull request and merge commit

From main page of repository there is indicator about number of Pull requests.

There is number 1 on Pull request tab. Click it to view.

Choose the Update README.md pull request by rrkurnova.

Review the change and if it is approved, click Merge pull request button.

Fill additional information if necessary and click Confirm merge button.

Continue and click Merge pull request button.

Now the commit has been merged by owner.

View contribution

Visit main page of the repository https://github.com/dudung/a-new-repo.

There are now two contributors, which are dudung and rrkurnova. Visit https://github.com/dudung/a-new-repo/forks.

It displays the information of a contribution. Click Network menu on the left.

It shows the time line of recent commits. Please mouse pointer on the black and blue dots to see further information.

It can be seen that happens on each dot in the time line.

Create issue for discussion

Visit main page of user with forked repository

Issues tab is not shown on forked repository. Visit source repository, which is the link after forked from.

Now click Issues tab.

Click New issue button.

Fill information about title of the issue.

Add messages and mention owner or other contributors.

Click Submit new issue button.

The issue now is posted.

And it is listed at https://github.com/dudung/a-new-repo/issues.

Mentioned user will notified and see the issue. Click it to review.

Reply the message and mention the user also.

Click Comment button.

Now there are two participants in this this issue. Click Done button above to clear it from notifications.

The other user will now have notification. Click it to open.

Reply and click Close with comment button, if the issue has been resolved.

Choose which one is more suitable and click Close with comment.

Now the issue is closed.

There is 0 open issue and 1 closed one.

--

--