Skip to main content

Newbie Guide To Working On Someone's GitHub

The first thing you should do as a newbie to GitHub is install GitHub Desktop https://desktop.github.com/

Official GitHub Documentation Steps

Step 1) https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop

Step 2) https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/managing-branches

Step 3) https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project

Step 4) https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/pushing-changes-to-github

UnOfficial Docs by Froz

1.1 Method 1: Cloning a Project from Browser

Sign in to your account at github.com and open the project owner's GitHub project in the browser. For example. https://github.com/thiendao97/HelloWorld would be one. Then clone to your  preferred location this can be any where you want. Think of it as downloading a whole folder.

1.2 Method 2: Cloning a Project from GitHub Desktop

Open GitHub Desktop. File -> Clone Repository. Paste in the project owner's project URL. Then clone to your preferred location. The default is in your Documents\GitHub.

2.1 Easily locate directory with Repository -> Show in Explorer

Major GitHub Concept - Making Changes and Discarding Changes

When you modify, add or remove files inside the GitHub project you pulled, the changes will show up on GitHub Desktop. In the video example below, I will edit hi.java and you will see changes show up.

In GitHub Desktop, if you right-click on a changed, added, or removed file you can click discard changes to revert things back to a previous commit.

Branching and working on your part of the project

To work on your portion of the project you should branch out! Give your branch a name a create it! Once you create your new branch you should press "Publish branch" to upload to the remote GitHub Repo.

You can always switch between branches on GitHub. Every time you switch branches the files and folders will change based on the branch you swapped to. The video below shows this.

After branching you can now make edits / work on your portion of the project.

Editing + Committing Changes

Every time you work on your branch you commit to your local repository (your computer first) and then push to origin (the repo on GitHub cloud) to upload your work.

In the video I'm on anons-branch, I made some edits to hi.java. Once I press save GitHub Desktop will notice and show you what has been changed. If you're ready to commit go ahead commit then push! If you don't know your changes and want to revert back you can always right click on the file to revert on GitHub Desktop then click on Discard changes.

Switching between Branches Demo