1. Trial and Error
One the best ways to learn anything is to just try. When you try, you always learn. If you try and fail, you learn what not to do and gain insight into how something works. When you succeed, you learn what to do next time! Learning how to use GitHub and how to code is no different. In fact, learning by trial and error in the tech field is even easier.
GitHub provides you with unlimited public and private repositories, which means you can try all kinds of things without ever spending a dollar! We highly recommend getting onto GitHub.com and creating a new repository. From there, make a README.md file that you can easily modify and work with. This is the “Hello World” app of a GitHub repo. You can create issues and pull requests that modify the README.md file just to see how they work.
To learn more about collaboration on GitHub, invite your friends to be collaborators on your repo or make your repo public and send them the link to it. Ask them to comment on issues and create and review pull requests. Ask your friends to make their own public and private repo where you’re a collaborator so that you can try all the GitHub features from the perspective of a contributor. There is no harm in trying things out.
After you finish exploring, you can always delete the repositories, if you want. keeping some around may be useful for the inevitable time when GitHub releases new features that you want to try on a dummy repo.
2. GitHub Help Docs
The GitHub help docs are extensive and detailed. You can find them by going to https://help.github.com. The help docs can be extremely useful if you know exactly what you want to get done. With 38 categories that each have anywhere from 1 to 70 docs, hundreds of pages describe every single feature of GitHub with images and cross referenced links.
At the top of the GitHub Help page (where all the docs are located) is a search bar where you can type a query, and docs related to that query will appear. Similar to Google, as you start typing your query, results will start to appear. If you press Enter or click the magnifying glass button, a page with search results appears. On this page is a notation next to the doc title with the category that it is a part of. We recommend paying attention to that notation because it will help you better navigate docs in the future. If you understand how GitHub categorizes the docs, you may be able to find what you’re looking for faster next time.
If you click a specific doc, you see the documentation page. On the right side of this page is a list of Article versions. The documentation defaults to GitHub.com documentation, but GitHub also offers a slightly different version to enterprise users. Clicking on the different article versions displays the docs specific to that version of GitHub, ensuring that you have the most accurate information.
Extremely security conscious companies are more likely to use GitHub Enterprise, as it allows them to have the interface and functionality of GitHub while keeping their code and data secure on their own servers. This ability can be important if you have proprietary code that you don’t want anyone, not even GitHub, to have access to. If you’re planning on open sourcing your code (which a lot of large companies, like Microsoft, do a lot of) or you just want your code to be private from the world, storing on GitHub.com is typically good enough.
At the bottom of each documentation page you will typically find a section called Further reading. This section lists documentation pages that may be relevant to what you’re trying to do. Below this section is a button that says Contact a human. If the documentation isn’t helping you resolve your issue, click this button to go to a page where you can contact GitHub. The Contact page has an extensive list of all the ways you can try to help yourself first, but then provides a quick and easy message section for you to ask a question. On the left side of the contact page you can also find other reasons for contacting GitHub, such as reporting abuse, reporting content that isn’t appropriate, reporting copyright infringement, privacy concerns, and portals for both premium and enterprise support, if you’ve purchased those plans. You can also directly access this page at https://github.com/contact.
This Contact page is not where you should submit a question or concern about a specific repository unless you’re reporting abuse, content, or copyright infringement. If you have a problem getting code to run or have a question about a specific repository, you should ask in an issue directly on that repository home page on GitHub.
At the top of the GitHub Help page is a drop-down list where you can select which version of GitHub you’re interested in looking at the documentation for. This selection defaults all the docs to that version so that you don’t have to change it every time you visit a page. There is also a quick link to the Contact page and a quick link to return to the GitHub home page.
Docs are your friend. There is a lot to learn and software changes quickly; expert programmers are experts not just because they know a lot, but mostly because they know how to figure something out — and that often means knowing how to find information.
An alternative to the docs is the GitHub Guides found at https://guides.github.com. These visual, quick five to ten minute guides explain a specific action you can take in GitHub — for example, how to fork a project. These guides are great reminders for how to do something and provide a bit more insight than the documentation page for a specific feature.
3. GitHub Learning Labs
GitHub has invested in a team of folks dedicated to helping novices learn how to use GitHub. And though documentation can help when you know exactly what you’re looking for, sometimes it can be hard to follow still images. That’s why GitHub brings you Learning Labs, which are absolutely incredible. Learning Labs are step-by-step, guided tutorials where you actually create a real repository on GitHub and perform real actions that you would normally. The friendly GitHub Learning Lab Bot guides you through the tutorial, creating pull requests for you to review or issues for you to close out.
To get started with the Learning Labs, go to https://lab.github.com and click the blue Sign in with GitHub button. Now you can browse a number of courses that may be useful for you to get an in-depth introduction into everything GitHub.
On the Courses page, at https://lab.github.com courses, you can find 14 (maybe more by the time you read this book) courses categorized into topics such as Git, GitHub, and Open Source. With some of the most commonly used features on GitHub being highlighted, you can learn to review pull requests, manage merge conflicts, and make your open source project stand out among the millions of projects on GitHub.com.
Clicking on a course takes you to a detailed page where you can learn more about that course and join it. Often times, the Learning Lab will want to create a public repository on your account. Don’t worry; you can always delete it after you’ve finished the course, but there is also nothing wrong with showing the world that you take learning seriously. You will also be asked to accept the Terms and Conditions and to install the Learning Labs app onto your account. This app installs only on the repos you select, so you can have it install on the repo that it creates as part of the course. For example, doing the merge conflict course, you may give it access only to the merge-conflict repo that it creates, as shown in Figure 18-1.
After you install the Learning Lab app, return to the Learning Lab course page (for example, https://lab.github.com/install?org=githubtraining&course= managing-merge-conflicts) and click the Done installed? Move on link under the green Install button. You’re taken to a new page with each of the course steps. The course overview page is useful because you can always stop in the middle of the course and pick it up later if you aren’t able to finish in one sitting.
A typical Learning Lab will have the bot open an issue in the repo that it created with a description of what you should do. All you have to do is read through the issue and follow the instructions!
We recommend opening the repo in a new tab so that you can refer back to the instructions without losing your place in what you’re trying to accomplish.
When you’re just starting to get introduced to GitHub, Learning Labs is a great way to experiment with features and learn specific workflows. It’s essentially trial and error, but with a helpful guide.
4. GitHub In-Person Training
GitHub is tool for more than 30 million developers and over 2 million organizations. From novice coders just learning to create their first GitHub Pages website in Markdown to Microsoft bringing you VS Code, GitHub’s goal is to support more people building more software. As such, GitHub offers trainings where a GitHub expert will help better equip your team to use GitHub.
With eight different focus areas, plus a customized training in case you need something different for your team, GitHub will not only guide you through the
details on how to use GitHub, but will engage everyone in the fundamental workflows and techniques to using it effectively. The focus areas are
» Workflow consultation
» Admin mentoring
» API consultation
» Services account engineering
For a full description of each of these areas, as well as what you can get with a customized course, visit https://services.github.com. This service is not free. You can submit an inquiry and a GitHub representative will reach out with more information about costs.
If you’re a novice, you may not need the full-force of a GitHub trainer. However, it may be something for you to suggest to your company if it’s asking you to switch over to using GitHub. In-person training can also be useful if you start a company and want everyone on your team to not only use the tool, but to use it effectively.
5. Project-Specific Documentation
One of the best ways to learn about a specific open source community and a specific technology is to reach the project-specific documentation. When you are both new to GitHub and new to a technology, it can be effective to read through the documentation most relevant to your interest and to explore the behaviors of other members of the community by reading through issues and pull requests.
The VS Code project is a good example of a project with good documentation and enough community engagement to understand behaviors. If you go to https://github.com/microsoft/vscode, you can find a well-written README with links to where you can submit bugs and feature requests, how to contribute to the project, and where to engage with the core developers.
When you’re first starting to learn, following the How to Contribute documentation (for example, VS Code has a wiki page for it at https://github.com/Microsoft/vscode/wiki/How-to-Contribute)can help you get your code up and running on your local machine. Even if you don’t end up contributing directly to the project, following this documentation can be a good learning exercise.
Some projects are strict on their style and contributing guidelines. For example, the VS Code project has guidelines on style found at https://github.com/Microsoft/vscode/wiki/Coding-Guidelines. Having code that is consistent in style means that errors are less likely to occur. For example, if you always use PascalCase for type names and camelCase for function names, you can quickly identify when someone accidentally referred to a type instead of a function in their code.
It is also important to know the requirements for contributing code to the open source project. For example, on VS Code, you must first sign a Contributor License Agreement before you open a pull request on the repository.
Looking through open and closed pull requests can also be good practice when you’re trying to learn about the specific community. Understanding what kinds of errors are common in the particular code base or what kinds of changes the core team typically requests can help you learn about the technology as well as the specific project. Successful open source projects will have pull request reviews with substantial information. For example, on one of the pull requests for the VS Code project, you can see user ramya-rao-a not only let user grunxen know that alerts shouldn’t happen, but also provides a suggestion on how to fix this bit of code, as shown in Figure 18-2.
6. External Community Places
Some open source projects have places other than GitHub where more general conversations can happen. These places can be a really great way to learn without having to explicitly open an issue or pull request. You can find these extended communities many places online, some with a more interactive community while others are more feedback-driven.
The VS Code project, for example, calls out the StackOverflow questions that are tagged with visual-studio-code. If you have questions about VS Code, it’s best that you first search the questions already asked. If yours is unique, make sure you use the appropriate tag when writing it.
This project also suggests giving feedback on Twitter, asking questions or directly giving feedback to the @code alias. Giving feedback is also a good way to get updates on the project.
The Atom project, on the other hand, has a specific forum run on its website found at https://discuss.atom.io. This forum is a great place to search for answers to your question or ask a unique one, if it hasn’t been asked. As you become more expert in using Atom, you can start contributing answers.
Atom also has a public Slack that you can join. Just visit http://atom-slack.herokuapp.com and enter your email address. You will be sent an invitation to join the public Slack channel where you can ask questions and generally follow the discussion around Atom, Electron, or just general chat “around the water cooler”. This resource is great if you’re learning on your own. A Slack channel can be a virtual office where you have colleagues and peers that you can ask questions to in a lightweight manner (for example, not open an issue on GitHub).
7. Online Coding Tutorials
Depending on what you’re trying to learn and contribute to on GitHub, an online coding tutorial may be right for you. Now, you can probably find thousands of coding tutorials online from a random person posting a blog to a YouTube video showing you exactly how to do something, but some of our favorite coding tutorials offer you an in-browser sandbox where you actually get to try out the code it’s trying to teach you about.
When dealing with GitHub, you may be inclined to learn a bit of Ruby. If you ever want to create a GitHub app or integration, it may behoove you to know a bit about Ruby to make your life easier because GitHub is built using Ruby. The online
tutorial https://ruby.github.io/TryRuby gives you a step-by-step guide with an editor and an output window right in your browser.
While the Ruby tutorial gives you a handy Copy button so that you don’t have to type all the example code every time, it can be useful to go through the motions of typing to slow down and better learn what you’re reading. We recommend typing the code, even if it seems simple enough, so that you get more practice.
Another interactive sandbox tutorial website that we particularly like is the Try .NET site at https://dotnet.microsoft.com/platform/try-dotnet. Before diving in to the intricacies of the .NET Framework, you can get your hands dirty in a safe environment right in your web browser. With snippets that you can try, tutorials you can follow, or simply an open playground to experiment, this site can offer you support at any stage in your career.
While you can definitely find other sites where you can code in the browser, these are just a few of our favorites. When you’re first starting to learn a new language or framework, we recommend you explore various resources or ask for recommendations from peers or communities you’re interested in joining before just following the first tutorial you find.
8. Online Courses and Tutorials
Online courses are becoming more popular with the development of better tools for engaging with learners. Two of the largest platforms for online courses are Coursera and EdX. These platforms partner with universities and large companies to provide in-depth education and sometimes certification or even degrees.
Both Coursera and EdX offer specializations with multiple courses. For example, there is a Ruby on Rails Web Development Specialization on Coursera that was created by Johns Hopkins University. Meanwhile, Microsoft offers a professional certificate in Introduction to Computer Science, which has three courses.
Furthermore, some universities offer degrees, such as the University of London and its bachelor of science in computer science degree on Coursera or University of California, San Diego’s MicroMasters in data science on EdX. These programs often require an application and admission into the specific program — not just anyone can join.
For more lightweight options, sites like Udemy and Pluralsight offer more than 100,000 online courses at low prices or sometimes even free. These courses tend to be more focused on video lectures and tutorials rather than extensive course – work, but they’re really great options for when you’re first getting started and just want to get an introduction into something.
Khan Academy is another great place to find always free courses. Khan Academy supports learners as young as two on its Khan Academy Kids app (https://www.khanacademy.org/kids?from=lohp) to adults looking to learn something new from computing to studying for the LSAT to entrepreneurship and growth mindset! This great resource offers curated courses that are more lightweight than Coursera or EdX.
It is also important to not forget the power of YouTube. Though videos on YouTube aren’t curated and aren’t held to any standards, you can find a lot of really amazing content. For example, The LearnCode.academy channel has a GitHub Tutorial for Beginners video with almost two million views. Siraj Raval is also a great channel to follow as he gives tutorials, but also explains the history of certain technologies and how they actually affect our world.
9. Blogs and Twitter
If you’re looking for a updates on certain technologies or products or a quick answer to something, it can often be fruitful to follow the right people on Twitter and subscribe to the right blogs. We won’t be able to tell you who the right people are for you to follow, because each person reading this book may have different interests when it comes to learning and contributing on GitHub, but we can give you some tips!
First, recognize that people who use Twitter and who blog are usually only representing their own ideas and are not representing a company or being held to any company standards. This means that you should take what they say with a grain of salt and recognize that they are just people, saying what is on their mind, and probably also still learning and developing (as we all are always learning and developing).
When searching for Twitter accounts to follow, you can start with accounts representing the technology you’re interested in learning about. For example, following @GitHub may be a good idea because this account will not only post updates to GitHub, but will also often highlight other tech, people, or events related that may be of interest to you. This will start to give you ideas on other people to follow. For example, GitHub recently retweeted Safia Abdalla (@captainsafia) who is a developer at Microsoft and is also an open source developer. She does keynotes and talks on open source development, too, so if you’re interested in learning more about open source development, she may be a good resource of information!
Advice on which blogs to follow is similar to the advice on Twitter. We’d recommend starting with some of the blogs that may have the most relevant information — for example, the GitHub blog at https://github.blog gives you up-to-date information about GitHub features. Another great resource is Medium. com, where you can search any keyword and get a number of different perspectives and pieces on it. For example, https://medium.com/search?q=github results in a lot of lists of things you can do on GitHub that you may not have known about. It can be a great start to then looking into the GitHub docs for more in-depth information. Finally, you can also just Google a keyword, and various blogs, tutorials, and videos are likely to pop up.
10. Community Forum
We also recommend the GitHub Community Forum. especially for getting help about GitHub. Found at https://github.community, this forum tends to have hundreds of people actively online at any given time. The GitHub community is worldwide, and people from all different technological backgrounds are typically eager and willing to help.
Many threads contain topics specific to GitHub, such as how to use Git and GitHub, GitHub Pages, and the GitHub API. But this community forum offers even more than GitHub-specific information. As the number one place for developers, GitHub also provides a space for the community to learn from each other in general programming concepts and projects overall.
Before participating in the GitHub Community Forum, we recommend reading through the Code of Conduct, found at https://github.community/t5/Welcome/Code-of-Conduct/m-p/65#M37. Just like an open source project, the community forum is an open place where one must remain respectful and maintain a collaborative spirit.click
From this community forum, you can also find the GitHub Education community forum at https://education.github.community focused on how to use GitHub in the classroom. This resource is great if you’re a student and you’d like to convince your teacher to use GitHub or if you’re a teacher looking to teach your students.
The GitHub Community Forum is a great place to ask your generic questions that wouldn’t be appropriate to ask on a specific repository. The GitHub community is vast as it is a large portion of the developer community. Almost anywhere you go in the developer community, you are sure to find someone who can help you or at least point you in the right direction. The most important thing for you to remember is to ask questions, be respectful, and remember to give back with your knowledge as you begin to learn.
Source: Guthals Sarah, Haack Phil (2019), GitHub for Dummies, Wiley.