DEV Community

Sarah Bartley-Dye
Sarah Bartley-Dye

Posted on

Working with Github

Ready to meet a new friend? The next lesson in Skillcrush 105 is about GitHub, Git’s best friend. There is a lot we can do GitHub, but today is the introduction. That means you will learn what GitHub is, why developers like to use it with Git, and how to create a GitHub account.

What is GitHub?

Skillcrush defines GitHub as an “online platform that hosts users’ Git repositories”. Developers love GitHub! GitHub is great for sharing repos, making it an online portfolio for web developers.

Employers also like GitHub, and it is often listed on job postings as a desired skill. Potential employers will look at your GitHub to see the projects you have worked on and how active you are on the platform. So it is essential to have a GitHub profile if you are in web development.

Skillcrush encourages students to think of Git as the software to create and maintain repos. That means that GitHub is the host for your repos, so people can see and view them.

Public vs Private repo

There are two types of repos you’ll see on GitHub: public and private. Public repos are what others will see on GitHub. Private repos are ones that you will see only.

There are pros and cons to using both types of repos. Most developers have their repos public because they are great for creating templates and staying alert to any issues developers need to address. Private repos are great for freelancers because they can keep a private repo of a project they are building for a client.

When I started learning Git and GitHub, GitHub required a fee for private repos. So most developers kept their repos public to avoid the fee. That has changed today, but for this class, Skillcrush has students keeping their repos public.

Pull Requests

You can make changes to a repo using a pull request. A pull request is a change a developer might suggest to a repo. If you spot a typo in another person’s repo, you can submit a pull request to the repo owner.

The repo owner reads it and decides what to do next. They can either accept the change or reject it. If the repo owner needs more information, they can message you back so you know what changes need to be made for your request to be accepted.

You will learn more about pull requests in future lessons and make a pull request to a repo in a later lesson. Today, you will be looking at where to find the pull requests that have been made to a repo.

Issues

Developers can use the issue feature on GitHub to let each other know about bugs and recommend any changes to a project without submitting a pull request. You can think of it as adding a comment, just as developers use to write comments in any other programming language. If you want to contribute to a repo in the future, this is the place to start to see where to contribute.

How to search for a repo

There are a lot of repos on GitHub so there's a lot to explore here. You can find any repo on GitHub using the search feature. You can find a repo by entering the repo name, author, or topic in the search bar.

For example, let's say you want to look for repos in a specific language. You can search for the language in the search bar and find lots of projects that use this language.

View commits

You can learn a lot about a repository on GitHub. When you look at a repo, you see the number of issues, pull requests, and contributors. That information will create a picture of the repo’s quality and how active that repo is.

Active repositories are a good thing on GitHub. When you see lots of commits, it means that people are trying to change the code for the better.

Contributors

Another sign of a popular repo is how many contributions are being made. A contribution in a repo is how many people are adding to it. You can see all this information by clicking the history button to look at the entire history of a repo.

After you click this button, you click a specific file. That file will show lots of information, such as the number of contributors and the quality of the repo. Having lots of contributions is a good thing on GitHub because that means more ideas and suggestions. More ideas mean the code will be better.

Layout for a Great GitHub profile

There's a lot of advice on how to make a great GitHub profile, but here are some tips on what you need for your profile.

1.Profile photo.
Follow the same guidelines for creating a LinkedIn profile picture. Use a photo of yourself that will make you stand out to future clients and employers. Make sure it is semi-professional.

My GitHub profile uses the same picture from my LinkedIn profile, but I have seen developers use different profile pictures for GitHub than on LinkedIn or Twitter. When in doubt, keep things consistent.

2.Name
Consistency also applies to your name. Skillcrush says you don’t have to use your legal name, but make sure it is professional. That means the name you use on your resume and LinkedIn should be the one you use here.

The name on my profile has changed a bit since I've set up my GitHub profile, but the name I have on my profile does its best to match what is used everywhere I am on the web. It also still lists BritishPandaChick since I still use that name in different places on the web. I recommend that new developers just use their name instead of using a username like BritishPandaChick.

3.Bio.
GitHub includes a Bio section on your profile. This is where you can describe yourself a little bit. This section doesn't mean you need to put your life story.

However, you can put a couple of sentences so people get to know you. For example, you can say “hello, my name is Sarah, and I’m currently learning Python so I can work as a web developer. Skillcrush says you can put any projects you have done, accomplishments you have gotten, and even some of your interests.

Most GitHub profiles I've seen just say what job title they have. Mine says I'm a software engineer and an online coding instructor. So keep your bio short, unique, and consistent.

4.Additional Details.
This section is where you can add more details people can learn about you. You can add things such as the company you work for, the location you are at, and your website. You can fill in as many details as you want in this section, but I recommend putting your e-mail, your timezone you are at, and your website link there.

Time zone is important when you collaborate with anyone online since people work in different time zones. If you don't have a portfolio site for the website link, don't fret. Just use your LinkedIn instead.

Challenge: How to Create a GitHub Account

The first challenge in this lesson is making your GitHub profile. Here are the steps Skillcrush gives for students to create their GitHub profile.

1.Go to github.com and click the sign-up button.
2.Pick your user name, email, and password. Your username will be visible to other users, so Skillcrush recommends picking something you are comfortable with people seeing. Just make sure you use the email you used to set up your Git on your computer earlier.
3.Verify your account, then select your GitHub plan. You will want to pick the one that says free. GitHub asks questions so they can tailor your account to your interests, but Skillcrush says you don’t have to do this. You just need to make sure you click complete setup.
4.Verify your email address. Once you are verified, log in to GitHub. You’ll go to the page where you can create your first repo. You can skip this for now.
5.Go to the profile icon and click settings. Make sure the public profile is selected. You’ll see a form to enter information.

You will want to add the following:

  • your name
  • a short bio
  • your location
  • a URL for your website.
  • a photo

Click the update profile button when you are done. Now you officially have a GitHub account.

Challenge: Examining a GitHub Repo

Skillcrush has students practice examining a repo up close using the React repo from Facebook. If you haven't heard of React before, React is an open-source library. Skillcrush describes it as an add-on to the JavaScript language.

React was created by Facebook. When Facebook made it open-source, it means that they can share it with the entire world via this repo. After you look at this repo, you can repeat this process with other repos on GitHub.

Here are the exact instructions from Skillcrush 105 for this activity. If you need help finding anything in a repo, don't be afraid to reach out for help in the comments of this post.

1.Go to the React repo at github.com/facebook/react.
2.Click commits underneath the green Code button at the top of the screen. Pick any commit to examine it closely. On the right side, you will see a hash (seven numbers and a letter) and click on it.

Scroll through the commit to see what has been added (additions will be green and have a + sign beside it) and what has been deleted (these will red with a - sign beside them). Once you have done this, click the back button of your browser to look at another commit to review.

3.Go back to the repo’s home page by clicking “react” at the top left of the screen. It will be right next to Facebook. On the right sidebar, click the contributors link.

Scroll through the contributors. You can see how many commits they made to this repo and how much code has been written.

4.Under the repo name (this is next to the <> Code link), look for the issues link with a number beside it. They will have a number like 718 next to it. This is the number of bugs reported in the code.

Click issues to view all the reports. You will want to click on an issue labeled in red “Type: Bug” tag. Read the issue documentation.

Don't worry if you don't understand what the bug is exactly saying here. The goal here is to find the documentation this repo has on bugs that need to be fixed. You will see the information shared, such as the type of request and the information included in the bug.

5.Next to the Issues link, click the pull requests link. This lists all the pull requests. Look at the total Open and Closed pull requests.

Click the Closed link to see the types of pull requests that have been submitted to the React repo. The pull requests with the Approved label have been accepted and included in the repo.

Conclusion

Congratulations! You now have a GitHub profile. Now that you have a GitHub account, you can start using it.

The next lesson will continue looking at GitHub. You’ll be connecting your GitHub to your computer. This means you will be pushing your first repo to GitHub as well as learning how to fork, clone, and modify a repo.

Top comments (0)