
{"id":4682,"date":"2021-12-27T12:00:00","date_gmt":"2021-12-27T11:00:00","guid":{"rendered":"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/uncategorized\/what-is-github\/"},"modified":"2023-01-06T13:32:43","modified_gmt":"2023-01-06T12:32:43","slug":"what-is-github","status":"publish","type":"post","link":"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/web-development\/what-is-github\/","title":{"rendered":"What is GitHub? A Comprehensive Tutorial for Beginners"},"content":{"rendered":"<p>As an <a href=\"\/en\/blog\/web-development\/what-does-it-take-to-become-a-web-developer-everything-you-need-to-know-before-getting-started\/\">aspiring web developer<\/a>, you may already be familiar with GitHub as an application you can use to store your code on the web.<\/p>\n<p><strong>But it&#8217;s also so much more than that.<\/strong><\/p>\n<p>So, what is GitHub?<\/p>\n<p>Essentially it&#8217;s a tool used by individual developers and teams alike all across the world to collaborate with each other on virtually any kind of project imaginable.<\/p>\n<p>GitHub uses a piece of version control software (more on this later) called \u201cGit\u201d, which you can download and use on your local development machine. Git is a separate piece of software from GitHub, and this article assumes you are somewhat familiar with the concept of Git. If not, check out our explanation of <a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/web-development\/git-vs-github\/\">the differences between Git and GitHub<\/a>.<\/p>\n<p>Github has many unique features that make it extremely popular these days. Besides simple storage, it&#8217;s an entire ecosystem complete with an elaborate social networking aspect, allowing individual developers to contribute to multiple teams and projects. Once you get into the flow of managing repositories using GitHub, you\u2019ll get an idea of just how useful it can be.<\/p>\n<p>In this guide, I\u2019ll show you what GitHub is and provide some useful tips on how to use GitHub. This article will be split into the following sections:<\/p>\n<ol>\n<li><a href=\"#what-is-version-control\">What is version control?<\/a><\/li>\n<li><a href=\"#a-git-refresher\">A Git refresher<\/a><\/li>\n<li><a href=\"#what-is-github-main-functions-and-features\">What is GitHub: Main functions and features<\/a><\/li>\n<li><a href=\"#github-wrapping-up\">GitHub: Wrapping up<\/a><\/li>\n<\/ol>\n<h2 id=\"what-is-version-control\">1. What is version control?<\/h2>\n<p>Version control is, as the name implies, a way to manage different versions of your code base.<\/p>\n<p>We&#8217;ve written a <a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/web-development\/whats-version-control-and-why-do-i-need-it\/\">complete guide to version control systems in web development<\/a> if you&#8217;re interested in learning more, but we&#8217;ll do a quick introduction here. Firstly, let&#8217;s start by asking the question &#8220;Why would you have different versions of the same code?&#8221;<\/p>\n<p>Think about when you\u2019re playing a video game. You are about to enter a difficult dungeon from which you can\u2019t escape until you beat the boss. Before entering the dungeon, you\u2019ll want to save your game just in case the boss turns out to be too hard to beat and you\u2019re stuck in the dungeon forever. If the boss turns out to be too hard, all you have to do is load the version of your game where you were <em>outside<\/em> the dungeon and you\u2019re free to go off and level up.<\/p>\n<p>However, when you enter the dungeon and begin to progress, you\u2019ll want to save your game along the way, but you don\u2019t want to overwrite the original game you saved outside the dungeon. So when you save your game from inside the dungeon, you create a completely new branch, basically a copy, of your original game.<\/p>\n<p>If you successfully make it through the dungeon, then your current saved version becomes your new main version, and you continue on through the game. This is very similar to version control with Git and GitHub.<\/p>\n<h3>A vital tool for teams of developers<\/h3>\n<p>Let\u2019s say you have an application you\u2019re working on with a team, and you get tasked with adding a special feature to it.<\/p>\n<p>Instead of building the feature on the main branch (which could potentially bring down the entire application if you accidentally break something), you make a \u201ccopy\u201d of the application and begin building the feature on that copy.<\/p>\n<p>When you\u2019re done developing the feature, you ask your teammates to review your code. If you get the \u201cOkay\u201d from them, you can safely \u201cmerge\u201d your special feature branch back into the main branch.<\/p>\n<p>When you have multiple developers working on the same application, sometimes multiple developers will be working on the same exact file. This can create problems when merging the files back together, because it&#8217;s unknown which version of the files is the correct one. When this happens (and it does happen, unfortunately), a good version control system helps to make the solution relatively painless.<\/p>\n<p>This is how Git and GitHub work for version control. They are used so that multiple people can work on multiple files and multiple features in the same application and avoid major issues due to conflicting code or different versions on each developer\u2019s local machine.<\/p>\n<h2 id=\"a-git-refresher\">2. A Git refresher<\/h2>\n<p>Before we can get down to what is GitHub, it&#8217;s important to refresh ourselves on Git itself. Essentially, Git is a piece of version control software you can download and use on your machine.<\/p>\n<p>You use it to basically take snapshots (\u201ccommits\u201d) of your file structure when you get it to a state you want to \u201csave\u201d (eg. after building a new feature, after fixing a bug, after adding third party software, etc).<\/p>\n<p>You can use Git to create branches (as explained above), resolve conflicts with different versions of files, and integrate with GitHub so that your snapshots (commits) can be pushed up for your team (or the world) to see. If you&#8217;d like to learn more about how to go about doing this, check out <a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/web-development\/git-commit-command\/\" target=\"_blank\" rel=\"noopener\">our guide to using the git commit command<\/a>.<\/p>\n<p>This is typically done via the command line, or you can do it via a Graphical User Interface (or \u201cGUI\u201d, for short). However, it\u2019s widely expected that you\u2019re able to navigate Git on the command line, so if you\u2019re interested in adding this <a href=\"\/en\/blog\/web-development\/7-essential-tools-for-front-end-development\/\" target=\"_blank\" rel=\"noopener\">essential tool to your skillset<\/a>, you might as well dive right in with that!<\/p>\n<h2 id=\"what-is-github-main-functions-and-features\">3. What is GitHub: Main functions and features<\/h2>\n<p>So, now that we&#8217;ve brushed up on version control and Git, what is GitHub?<\/p>\n<p>It&#8217;s a key element of <a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/web-development\/what-does-a-web-developer-do\/\" target=\"_blank\" rel=\"noopener\">how a web developer typically works<\/a>. You may use it for something as simple as free cloud storage for your projects, or you may use it to show your code to potential employers interested in assessing your coding skills.<\/p>\n<p>As you can see, it&#8217;s far more than just a place to keep code safe in the cloud. It&#8217;s a tool used by both local and distributed teams collaborating on projects. Keep in mind, projects are not necessarily limited to software!<\/p>\n<h3>Repos<\/h3>\n<p>Repositories (or \u201crepos\u201d for short) can be created by anyone. A single repo is usually used for a single project.<\/p>\n<p>GitHub repos are, by default, open to the public. If users don\u2019t want the public to be able to access their repos, they can choose to keep their projects private for a small fee. In this case, the owner of the repo has control over who can view or copy the code.<\/p>\n<p>Public repositories, on the other hand, can be seen and copied by anyone. However, for someone to be able to make changes to the original codebase, the repo\u2019s administrator must first approve it.<\/p>\n<p>So don\u2019t worry\u2014no one can change your repository projects unless you give them special permission!<\/p>\n<h3>Branches<\/h3>\n<p>When someone wants to make changes to a GitHub repository, the person (usually a member of the team) will create a separate \u201cbranch\u201d.<\/p>\n<p>This branch is simply a copy of the current version\u2014well, it\u2019s not actually a copy\u2014Git\u2019s method of storing files is more efficient than that, but we can think of it as a copy. In most cases the current version is referred to as the \u201cmaster branch\u201d.<\/p>\n<p>The developer will work on the feature in this new branch until the feature is complete. At that time, the developer will \u201ccommit\u201d (store a snapshot of) the code in the new branch and then they will create a \u201cpull request\u201d. This basically lets the rest of the team know that the feature is finished and ready to be code-reviewed and, finally, merged into the main branch.<\/p>\n<p>Team members can review the new code (another good way to ensure good code quality) and then the administrator can approve the merge. The code will then be merged into the main branch, and the feature branch can be deleted. This is all done using GitHub!<\/p>\n<h3 id=\"the-github-social-network\">The GitHub social network<\/h3>\n<p>Because GitHub is so collaborative by nature, it shouldn\u2019t be a surprise that another main feature is its significant social networking aspect.<\/p>\n<p>Users can upload pictures and biographies, they can follow other users and \u201cfavorite\u201d their projects, and of course, form teams, or \u201corganizations\u201d, whose leaders can exert very specific control over the access of the individual members collaborating on a project.<\/p>\n<p><img decoding=\"async\" title=\"A screenshot of a GitHub user's homepage\" src=\"\/en\/wp-content\/uploads\/old-blog-uploads\/bill-github-blurred.png\" alt=\"A screenshot of a GitHub user's homepage\" \/><\/p>\n<p>This is an example of a single user\u2019s \u201chome page\u201d\u2014there&#8217;s a list of repositories and the number of followers\/users followed. At the bottom there is even a display of the number and frequency of contributions over the last year to repositories to which the user has access.<\/p>\n<p>It\u2019s very much like the home page of other social networks\u2014except that it\u2019s for coding!<\/p>\n<h2 id=\"github-wrapping-up\">4. Final thoughts<\/h2>\n<p>So there you have it: A beginner\u2019s introduction to what is GitHub.<\/p>\n<p>Whether you are working on personal projects alone or are part of a team working on huge enterprise software, GitHub is a useful tool. If you\u2019re alone, you can use it to store your code and show off what you\u2019ve done to others.<\/p>\n<p>You can use it to look at others\u2019 projects for inspiration and even fork (copy) projects that you may like to expand on and either contribute to, or break off and start building your own project.<\/p>\n<p>In teams, it not only helps to simplify the complexity of multiple developers working on multiple files at the same time, but it also aids collaboration\u2014reducing conflicts and improving code quality.<\/p>\n<p>Many companies use GitHub for many reasons, so becoming familiar with it is absolutely essential. So as well as not just saving you from embarrassing yourself by asking &#8220;What <em>is<\/em> GitHub?&#8221;, it&#8217;s a very desirable skill to add to your <a href=\"\/en\/blog\/web-development\/what-qualifications-do-you-need-to-become-a-web-developer\/\">web developer skillset!<\/a><\/p>\n<h4 id=\"want-to-learn-more-about-github-and-how-to-use-it\">Want to learn more about GitHub and how to use it?<\/h4>\n<ul>\n<li><a href=\"https:\/\/guides.github.com\/activities\/hello-world\/\" target=\"_blank\" rel=\"noopener\">GitHub themselves<\/a> have a great tutorial that will teach you the basic flow of creating a repository, managing branches, making changes, and merging those changes via pull request.<\/li>\n<li><a href=\"https:\/\/learngitbranching.js.org\/\" target=\"_blank\" rel=\"noopener\">Developer Peter Cottle created a fantastic activity<\/a> that helps more visual learners learn about branching with Git. The first four activities in the \u201cIntroduction Sequence\u201d give users practice in committing (making a \u201csnapshot\u201d), branching, and merging, as well as another important topic not covered in this article: \u201crebasing\u201d.<\/li>\n<li>Another <a href=\"https:\/\/www.atlassian.com\/git\" target=\"_blank\" rel=\"noopener\">great explanation of Git<\/a> that goes very in-depth (from a competitor of GitHub)<\/li>\n<li>An <a href=\"https:\/\/www.atlassian.com\/git\/tutorials\/what-is-version-control\" target=\"_blank\" rel=\"noopener\">excellent explanation<\/a> of general version control brought to you by Atlassian, owner of BitBucket.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re an aspiring web developer, getting to grips with GitHub is essential. Learn all about the main functions and features of GitHub in this guide.<\/p>\n","protected":false},"author":55,"featured_media":526,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_lmt_disableupdate":"yes","_lmt_disable":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-4682","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development"],"acf":{"homepage_category_featured":false},"modified_by":"Matthew Deery","_links":{"self":[{"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/posts\/4682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/comments?post=4682"}],"version-history":[{"count":2,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/posts\/4682\/revisions"}],"predecessor-version":[{"id":31928,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/posts\/4682\/revisions\/31928"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/media\/526"}],"wp:attachment":[{"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/media?parent=4682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/categories?post=4682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/tags?post=4682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}