{"id":15521,"date":"2024-03-26T11:50:50","date_gmt":"2024-03-26T18:50:50","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=15521"},"modified":"2025-06-13T22:49:04","modified_gmt":"2025-06-14T05:49:04","slug":"learn-version-control-git-github","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/","title":{"rendered":"Learning on the Couch with FreeCodeCamp: Version Control &#8211; Git + GitHub"},"content":{"rendered":"<p><span style=\"font-weight: 400\">If you\u2019d like to watch this blog live, <\/span><a href=\"https:\/\/www.youtube.com\/watch?v=GKrofae9CH8\"><span style=\"font-weight: 400\">here is a video<\/span><\/a><span style=\"font-weight: 400\"> of <\/span><a href=\"https:\/\/twitter.com\/nyahmacklindev\"><span style=\"font-weight: 400\">Nyah Macklin<\/span><\/a><span style=\"font-weight: 400\"> &amp; <\/span><a href=\"https:\/\/twitter.com\/jesslynnrose\"><span style=\"font-weight: 400\">Jessica Rose<\/span><\/a><span style=\"font-weight: 400\"> walking through the process of installing Git and setting up a GitHub account. Watch below or read on.<\/span><\/p>\n<p><iframe loading=\"lazy\" title=\"Learning on the Couch: Github Edition\" width=\"900\" height=\"506\" src=\"https:\/\/www.youtube.com\/embed\/GKrofae9CH8?feature=oembed&#038;enablejsapi=1&#038;origin=https:\/\/www.couchbase.com\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><span style=\"font-weight: 400\">In <\/span><a href=\"https:\/\/www.couchbase.com\/blog\/what-is-a-code-editor\/\"><span style=\"font-weight: 400\">our last post<\/span><\/a><span style=\"font-weight: 400\">, we learned about tools we can use to edit our code, like Visual Studio Code. Today, we will learn about an online tool we can use to store, share and track different versions of our code, GitHub. But before we can start learning about GitHub, we have to talk about Git (and yes they are different).<\/span><\/p>\n<h2><span style=\"font-weight: 400\">What is Git?<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Git is a <\/span><b>version control system<\/b><span style=\"font-weight: 400\">. But what is that? The <\/span><a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Getting-Started-About-Version-Control\"><span style=\"font-weight: 400\">official Git docs<\/span><\/a><span style=\"font-weight: 400\"> states: \u201c<em>Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.<\/em>\u201d If you play video games, Git is like a memory card that saves your game (your code in this instance) at many different places in time. Git will save a snapshot of your code at a specific point in time and you can access that snapshot later.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">What is GitHub?<\/span><\/h2>\n<p><span style=\"font-weight: 400\">GitHub is a web-based tool for storing\/housing\/sharing those snapshots\/saved moments in time of your code. Many engineers take the snapshots using Git and then <em>push<\/em> those snapshots <em>up<\/em>\u00a0to GitHub, where other engineers can view and edit (with permission) those snapshots and can even add new snapshots themselves. While GitHub sounds similar to Git, these are two different things. Git is the underlying version control system and GitHub is a suite of tools built around Git to make it easier to use and understand.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Setting up Git &amp; GitHub<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Before we can start using these helpful tools, we have to get set up.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">Introducing The Command Prompt aka The Terminal<\/span><\/h3>\n<p>The terminal (or the <em>Command Prompt on Windows<\/em>) is not this big scary place that you commonly see hackers in movies use.<\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image2-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-15529\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image2-1-1024x299.jpg\" alt=\"\" width=\"900\" height=\"263\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image2-1-1024x299.jpg 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image2-1-300x88.jpg 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image2-1-768x224.jpg 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image2-1.jpg 1200w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">It usually just seems scary because it is not as pretty as the rest of our computers.\u00a0 Actually, we can think of the terminal like the backstage of your computer.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">This is actually where we will use Git! But first we have to install Git.\u00a0<\/span><\/p>\n<h3><span style=\"font-weight: 400\">Part 1 &#8211; Installing Git<\/span><\/h3>\n<h4><span style=\"font-weight: 400\">For Windows users<\/span><\/h4>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li><span style=\"font-weight: 400\"> Visit the <a href=\"https:\/\/git-scm.com\/\">Git official website<\/a> <\/span><span style=\"font-weight: 400\">and select the <strong>Downloads<\/strong>\u00a0button in the center of your screen.<\/span><\/li>\n<li><span style=\"font-weight: 400\"> Select <strong>Windows<\/strong>\u00a0from the list of operating systems and select the <\/span><b>latest <\/b><span style=\"font-weight: 400\">version of <em>Git for Windows<\/em>.<\/span><\/li>\n<li><span style=\"font-weight: 400\"> The downloaded file will pop up in the top right of your screen or the bottom left of your screen. Once it has finished downloading, double click to open the file. This will launch the Git installer.<\/span><\/li>\n<li><span style=\"font-weight: 400\"> Follow the on-screen instructions. For now, the default options will do just fine. Click <strong>Next<\/strong>\u00a0until the installation begins.\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400\"> Congrats! \ud83c\udf89 You&#8217;ve installed Git on your Windows machine. Skip down to <em>Part 1.5 &#8211; Introduce Yourself to Git<\/em>.<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h4><span style=\"font-weight: 400\">For macOS users<\/span><\/h4>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li><span style=\"font-weight: 400\"> Open the terminal. If you don\u2019t know what the icon for it looks like, open your Finder app and search for the Terminal app or use Spotlight to search for it (hold down command and the space bar at the same time to open Spotlight).<\/span><\/li>\n<li><span style=\"font-weight: 400\"> Once you open the Terminal, Type: <em>git &#8211;version<\/em> and press enter. If Git isn&#8217;t already installed, macOS will prompt you to install it. Many usually choose to download <em>homebrew<\/em> to then install Git, and further instructions on that process can be found <\/span><a href=\"https:\/\/brew.sh\/\"><span style=\"font-weight: 400\">here<\/span><\/a><span style=\"font-weight: 400\">.\u00a0<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the icon in the screenshot which will copy the text and then paste it to your terminal and press enter.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Side note: This <\/span><b>might<\/b><span style=\"font-weight: 400\"> cause the Terminal to ask for your computer password to verify that you are authorizing this installation. Provide that password (you will learn more about <em>sudo<\/em> commands like this one later, but in short, <em>sudo<\/em> means <em>admin<\/em> level access to your computer, which is often needed to install <\/span><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Learn\/Tools_and_testing\/Understanding_client-side_tools\/Package_management#what_exactly_is_a_package_manager\"><span style=\"font-weight: 400\">package managers<\/span><\/a><span style=\"font-weight: 400\">\u00a0like <em>homebrew<\/em> (and <em>npm<\/em> for example).<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<ol>\n<li style=\"list-style-type: none\">\n<ol start=\"3\">\n<li><span style=\"font-weight: 400\"> Some text will populate your screen and then end, similar to this, press enter whenever it designates:<br \/>\n<a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image2-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15522\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image2-3.png\" alt=\"\" width=\"900\" height=\"586\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image2-3.png 900w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image2-3-300x195.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image2-3-768x500.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><br \/>\nHomebrew is installed. Go back and finish installing Git by typing into a new terminal window: <em>brew install git<\/em>.<br \/>\n<\/span><span style=\"font-weight: 400\">This is what should populate on your screen:<a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image1-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-15523\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image1-3-1024x389.png\" alt=\"\" width=\"900\" height=\"342\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image1-3-1024x389.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image1-3-300x114.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image1-3-768x291.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image1-3-1536x583.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image1-3-1320x501.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image1-3.png 1834w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><br \/>\n<\/span><\/li>\n<li><span style=\"font-weight: 400\"> You can verify that Git was successfully installed by typing into your terminal: <em>git &#8211;version<\/em> &#8211; which should have a version number pop up. This means Git was successfully installed! Now skip down to <em>Part 1.5 &#8211; Introduce Yourself to Git<\/em>.<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h4><span style=\"font-weight: 400\">For Linux users<\/span><\/h4>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li><span style=\"font-weight: 400\"> Open the terminal.<\/span><\/li>\n<li><span style=\"font-weight: 400\"> Depending on your distribution, type one of the following commands and press enter:<\/span>\n<ul>\n<li>For Debian\/Ubuntu: <em>sudo apt-get install git<\/em><\/li>\n<li>For Fedora: <em>sudo yum install git<\/em><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400\"> Enter your password if prompted.<\/span><\/li>\n<li><span style=\"font-weight: 400\"> Wait for the process to complete.<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h3><span style=\"font-weight: 400\">Part 1.5 &#8211; Introduce Yourself to Git<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Before you start using Git, you&#8217;ll need to tell git who you are. Here&#8217;s how:<\/span><\/p>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li>Open your terminal or the Command Prompt if not already open.<\/li>\n<li><span style=\"font-weight: 400\"> Type: <em>git config &#8211;global <\/em><\/span><em><a href=\"https:\/\/protect-usb.mimecast.com\/s\/Gg7zC5Aoxyi0AggZUyU4e4?domain=user.name\"><span style=\"font-weight: 400\">user.name<\/span><\/a><\/em><span style=\"font-weight: 400\"><em> &#8220;Your Name&#8221;<\/em> &#8211; and press enter. Replace &#8220;<em>Your Name<\/em>&#8221; with, well, your name!<\/span><\/li>\n<li><span style=\"font-weight: 400\"> Next, type: <em>git config &#8211;global user.email &#8220;<\/em><\/span><em><span style=\"font-weight: 400\">youremail@example.com<\/span><\/em><span style=\"font-weight: 400\"><em>&#8221; &#8211;<\/em>\u00a0and press enter. Use your email address in place of <em>&#8220;<\/em><\/span><em><span style=\"font-weight: 400\">youremail@example.com<\/span><\/em><span style=\"font-weight: 400\"><em>&#8220;<\/em>.<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">And&#8230; that&#8217;s it! Git now knows who you are. Now let\u2019s make a GitHub account.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">Part 2 &#8211; Sign Up for GitHub<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Navigate in your browser to <a href=\"https:\/\/github.com\/signup\">github.com\/signup<\/a> and follow the on screen instructions:<\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image6-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-15524\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image6-2-1024x556.png\" alt=\"\" width=\"900\" height=\"489\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image6-2-1024x556.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image6-2-300x163.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image6-2-768x417.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image6-2-1536x834.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image6-2-1320x716.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image6-2.png 1999w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">Once complete, you will be brought to your GitHub Dashboard:<\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image4-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-15525\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image4-3-1024x644.png\" alt=\"\" width=\"900\" height=\"566\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image4-3-1024x644.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image4-3-300x189.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image4-3-768x483.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image4-3-1320x830.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image4-3.png 1348w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><\/p>\n<h4><span style=\"font-weight: 400\">How to Create a Repository (Repo)?<\/span><\/h4>\n<p><span style=\"font-weight: 400\">Now we can start creating a <em>snapshot<\/em>\u00a0of code that I can share for other people to see on GitHub.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">We\u2019ll start by creating a repository, which is just another way of saying, create this home for my code to live online. We created a small home for your project that we built in our last post, and this home will be called <em>CopyAndPaste<\/em> (but you should call your repository, the home for this programming project, whatever you want, preferably the name of your coding project. This repository will also be made public for everyone to see, and we will press <strong>Create a new repository<\/strong>.<\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image3-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-15526\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image3-3-1024x629.png\" alt=\"\" width=\"900\" height=\"553\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image3-3-1024x629.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image3-3-300x184.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image3-3-768x472.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image3-3-1320x810.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image3-3.png 1342w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">Now you will see a screen with a lot of instructions on it. In the video, we followed one specific instruction, and that is to <strong>Get started by creating a new file<\/strong> (which is in the blue box, the third line of text down). This method skips using <em>git<\/em> and the terminal and just copy and pastes code into GitHub.<\/span><\/p>\n<p><span style=\"font-weight: 400\">However, in this post we will use the terminal method to get our code into GitHub since we set Git up and since more practice will always improve our skills as a developer. Look down to the <strong>&#8230; or create a new repository on the command line<\/strong>\u00a0section.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image5-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-15527\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2024\/03\/image5-3-1024x552.png\" alt=\"\" width=\"900\" height=\"485\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image5-3-1024x552.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image5-3-300x162.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image5-3-768x414.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image5-3-1536x828.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image5-3-1320x712.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image5-3.png 1999w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">First, we want this code to have a home on our computer somewhere, so if we don\u2019t already have a folder with code in it that we want to push to GitHub, we will have to make one. Let\u2019s make a new folder called <em>CopyAndPaste<\/em> on our computer. In your terminal, type: <em>mkdir CopyAndPaste<\/em> &#8211; or whatever name you want to use.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Then type: <em>cd CopyAndPaste<\/em>. Cd stands for <em>change directory<\/em>. You can learn more about different terminal commands like cd <\/span><a href=\"https:\/\/medium.com\/@grace.m.nolan\/terminal-for-beginners-e492ba10902a\"><span style=\"font-weight: 400\">here<\/span><\/a><span style=\"font-weight: 400\">.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">If you already have a folder with the code you want to push to GitHub, you\u2019ll need the name of that folder. And then you will want to navigate in your terminal to that folder, and then: <em>cd insertNameofFolderhere<\/em> &#8211; where you replace <em>insertNameofFolderhere<\/em>\u00a0with the folder name.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Now we are inside <em>CopyAndPaste<\/em> (or whatever your folder\u2019s name is). <\/span><\/p>\n<h4><span style=\"font-weight: 400\">Add Code to the Repo<\/span><\/h4>\n<p><span style=\"font-weight: 400\">We can now execute the commands GitHub establishes, one after another, pressing enter after each line of text.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">If you <\/span><b>do not<\/b><span style=\"font-weight: 400\"> have <\/span><a href=\"https:\/\/www.couchbase.com\/blog\/what-is-a-code-editor\/\"><span style=\"font-weight: 400\">Visual Studio Code installed<\/span><\/a><span style=\"font-weight: 400\">, or you just want a quick way to connect Git and GitHub together, execute the following lines of code in your terminal as is:<\/span><\/p>\n<pre class=\"nums:false lang:default decode:true\">echo \u201c# CopyAndPaste\u201d &gt;&gt; README.me\r\ngit init\r\ngit add README.md\r\ngit commit -m \"first commit\"\r\ngit branch -M main\r\ngit remote add origin https:\/\/github.com\/&lt;Username&gt;\/&lt;RepositoryName&gt;.git\r\n(For this line, replace the Username and repository name with your respective values.)\r\ngit push -u origin main<\/pre>\n<p><span style=\"font-weight: 400\">If you <\/span><b>do<\/b><span style=\"font-weight: 400\"> have Visual Studio Code installed and would like to practice getting the code from your code editor into Git and then into GitHub, skip this line of code: <\/span><em>echo \u201c# CopyAndPaste\u201d &gt;&gt; README.me<\/em><\/p>\n<p><span style=\"font-weight: 400\">And instead, jump to and execute <em>git init<\/em>. Next, go into VSCode and open the folder you just created in the terminal using the <em>mkdir<\/em> command to make a new directory. Then create a new file called <em>README.md<\/em> and input the same code <em># &lt;name of your Repository&gt;<\/em>, then save the file. Continue with the rest of the commands in the terminal beginning with: <em>git add README.md<\/em>.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Check GitHub, you should see a new file called <em>README.md<\/em> that has some text in it. Now, your first file has been pushed using Git into GitHub.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Congratulations &#8211; you&#8217;re all set with Git &amp; GitHub!<\/span><\/p>\n<p><span style=\"font-weight: 400\">Remember, every engineer was once new to these concepts. The first steps are always the hardest, but you&#8217;ve just conquered yet another! In our next post, we&#8217;ll learn about how to build and share websites with the code we write.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Keep going! We&#8217;re all here to learn together.<\/span><\/p>\n<p><span style=\"font-weight: 400\">&lt;3 Couchbase<\/span><\/p>\n<p><span style=\"font-weight: 400\">#LearningOnTheCouch<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019d like to watch this blog live, here is a video of Nyah Macklin &amp; Jessica Rose walking through the process of installing Git and setting up a GitHub account. Watch below or read on. In our last post, [&hellip;]<\/p>\n","protected":false},"author":84838,"featured_media":15528,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1814,1815],"tags":[1497,1413],"ppma_author":[9897],"class_list":["post-15521","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-design","category-best-practices-and-tutorials","tag-developer","tag-github"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learning Git &amp; GitHub: How to Create a Repository &amp; More<\/title>\n<meta name=\"description\" content=\"Learn how to install Git, set up a GitHub account, and manage different versions of code in this blog post. Couchbase is your go-to resource and SaaS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learning on the Couch with FreeCodeCamp: Version Control - Git + GitHub\" \/>\n<meta property=\"og:description\" content=\"Learn how to install Git, set up a GitHub account, and manage different versions of code in this blog post. Couchbase is your go-to resource and SaaS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-26T18:50:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T05:49:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2-1024x683.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"683\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nyah Macklin - Developer Evangelist\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@NyahMacklinDev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nyah Macklin - Developer Evangelist\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/\"},\"author\":{\"name\":\"Nyah Macklin - Developer Evangelist @ Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/69a3940e6ac02b2cdb3c95fbe435bb45\"},\"headline\":\"Learning on the Couch with FreeCodeCamp: Version Control &#8211; Git + GitHub\",\"datePublished\":\"2024-03-26T18:50:50+00:00\",\"dateModified\":\"2025-06-14T05:49:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/\"},\"wordCount\":1548,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2.png\",\"keywords\":[\"developer\",\"GitHub\"],\"articleSection\":[\"Application Design\",\"Best Practices and Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/\",\"name\":\"Learning Git & GitHub: How to Create a Repository & More\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2.png\",\"datePublished\":\"2024-03-26T18:50:50+00:00\",\"dateModified\":\"2025-06-14T05:49:04+00:00\",\"description\":\"Learn how to install Git, set up a GitHub account, and manage different versions of code in this blog post. Couchbase is your go-to resource and SaaS.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2.png\",\"width\":1999,\"height\":1333},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learning on the Couch with FreeCodeCamp: Version Control &#8211; Git + GitHub\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/69a3940e6ac02b2cdb3c95fbe435bb45\",\"name\":\"Nyah Macklin - Developer Evangelist @ Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/6a141e3847fc5140407d649ab3b4de7c\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/12\/image_2023-12-08_125555188.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/12\/image_2023-12-08_125555188.png\",\"caption\":\"Nyah Macklin - Developer Evangelist @ Couchbase\"},\"description\":\"Nyah Macklin is a Developer Evangelist who cares about making developers lives easier. They do that through learning in public, teaching and speaking. Nyah can be found keynoting international conferences and on Twitter @NyahMacklinDev speaking about data privacy, security, and breakthrough developments in artificial intelligence. Reach out to Nyah on Twitter or on the Couchbase Discord to learn more!\",\"sameAs\":[\"https:\/\/x.com\/NyahMacklinDev\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/nyahmacklin\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Learning Git & GitHub: How to Create a Repository & More","description":"Learn how to install Git, set up a GitHub account, and manage different versions of code in this blog post. Couchbase is your go-to resource and SaaS.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/","og_locale":"en_US","og_type":"article","og_title":"Learning on the Couch with FreeCodeCamp: Version Control - Git + GitHub","og_description":"Learn how to install Git, set up a GitHub account, and manage different versions of code in this blog post. Couchbase is your go-to resource and SaaS.","og_url":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/","og_site_name":"The Couchbase Blog","article_published_time":"2024-03-26T18:50:50+00:00","article_modified_time":"2025-06-14T05:49:04+00:00","og_image":[{"width":1024,"height":683,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2-1024x683.png","type":"image\/png"}],"author":"Nyah Macklin - Developer Evangelist","twitter_card":"summary_large_image","twitter_creator":"@NyahMacklinDev","twitter_misc":{"Written by":"Nyah Macklin - Developer Evangelist","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/"},"author":{"name":"Nyah Macklin - Developer Evangelist @ Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/69a3940e6ac02b2cdb3c95fbe435bb45"},"headline":"Learning on the Couch with FreeCodeCamp: Version Control &#8211; Git + GitHub","datePublished":"2024-03-26T18:50:50+00:00","dateModified":"2025-06-14T05:49:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/"},"wordCount":1548,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2.png","keywords":["developer","GitHub"],"articleSection":["Application Design","Best Practices and Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/","url":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/","name":"Learning Git & GitHub: How to Create a Repository & More","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2.png","datePublished":"2024-03-26T18:50:50+00:00","dateModified":"2025-06-14T05:49:04+00:00","description":"Learn how to install Git, set up a GitHub account, and manage different versions of code in this blog post. Couchbase is your go-to resource and SaaS.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/03\/image7-2.png","width":1999,"height":1333},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/learn-version-control-git-github\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Learning on the Couch with FreeCodeCamp: Version Control &#8211; Git + GitHub"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/69a3940e6ac02b2cdb3c95fbe435bb45","name":"Nyah Macklin - Developer Evangelist @ Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/6a141e3847fc5140407d649ab3b4de7c","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/12\/image_2023-12-08_125555188.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/12\/image_2023-12-08_125555188.png","caption":"Nyah Macklin - Developer Evangelist @ Couchbase"},"description":"Nyah Macklin is a Developer Evangelist who cares about making developers lives easier. They do that through learning in public, teaching and speaking. Nyah can be found keynoting international conferences and on Twitter @NyahMacklinDev speaking about data privacy, security, and breakthrough developments in artificial intelligence. Reach out to Nyah on Twitter or on the Couchbase Discord to learn more!","sameAs":["https:\/\/x.com\/NyahMacklinDev"],"url":"https:\/\/www.couchbase.com\/blog\/author\/nyahmacklin\/"}]}},"authors":[{"term_id":9897,"user_id":84838,"is_guest":0,"slug":"nyahmacklin","display_name":"Nyah Macklin - Developer Evangelist","avatar_url":{"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/12\/image_2023-12-08_125555188.png","url2x":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/12\/image_2023-12-08_125555188.png"},"author_category":"","last_name":"Macklin - Developer Evangelist","first_name":"Nyah","job_title":"","user_url":"","description":"Nyah Macklin is a Developer Evangelist who cares about making developers lives easier. They do that through learning in public, teaching and speaking. Nyah can be found keynoting international conferences and on Twitter @NyahMacklinDev speaking about data privacy, security, and breakthrough developments in artificial intelligence. Reach out to Nyah on Twitter or on the Couchbase Discord to learn more!"}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/15521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/84838"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=15521"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/15521\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/15528"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=15521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=15521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=15521"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=15521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}