<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kristine Du on Medium]]></title>
        <description><![CDATA[Stories by Kristine Du on Medium]]></description>
        <link>https://medium.com/@kristine-a-du?source=rss-b59327ce54ef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*TrFL_c6XA9I-hytg-2EkTQ.jpeg</url>
            <title>Stories by Kristine Du on Medium</title>
            <link>https://medium.com/@kristine-a-du?source=rss-b59327ce54ef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 23:51:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kristine-a-du/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The (Denver) Flatiron School Experience]]></title>
            <link>https://kristine-a-du.medium.com/the-denver-flatiron-school-experience-402ad2be3ca2?source=rss-b59327ce54ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/402ad2be3ca2</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[career-paths]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[bootcamp]]></category>
            <dc:creator><![CDATA[Kristine Du]]></dc:creator>
            <pubDate>Fri, 29 May 2020 23:15:40 GMT</pubDate>
            <atom:updated>2020-05-30T00:37:30.155Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve just graduated today from the <a href="https://flatironschool.com/career-courses/coding-bootcamp/denver">Flatiron School’s Software Engineering</a> program on the Denver “campus”. I walked into the WeWork building in the RiNo neighborhood of Denver on a cool, sunny day in mid-February with so much hope and excitement, not quite knowing what to expect. Though the program went fully remote in my cohort’s 5th week due to COVID, I am on a high from the past 15 weeks. I could not be happier with my decision to attend this program and feel so lucky to have landed in Denver. These are a few of the values I hold dear that I feel the program really embodied:</p><h3>Inclusivity</h3><p>The diversity of students coming into a program like this is wide-ranging, from recent high school graduates forgoing a typical college degree to seasoned professionals coming from non-technical backgrounds to self-taught coding hobbyists, all looking to pursue new skills. A huge reason why I decided on an in-person program was to meet people and feel like a part of a community. Flatiron is just that, a wonderfully positive community of people learning and supporting each other. The Denver staff was admirable in making students feel like every developer and software engineer has started in the same place and gone through the same experience. They went out of their way everyday to check in with students and provide 1 on 1’s with those who were struggling with a concept or needed support on a project.</p><p>An especially standout aspect of the Denver program is the way code challenges are implemented. As part of the Flatiron School curriculum, students are expected to pass a code challenge in each of the first 4 modules (each mod is 3 weeks) to signify that they grasped the material taught and are ready to move on in the program. What the Denver campus does is allow students to take the code challenge up to 5 times within a mod. Imagine as a student in high school or college, being allowed to take a “test” that many times. These code challenges shouldn’t be considered tests though in the traditional, as they are a measure of progress where each code challenge is reviewed 1 on 1 with an instructor. Passing a code challenge on the first try is not expected as it is released on the 2nd Tuesday of a mod, and sometimes not all of the material had been covered in lessons by that point (the single code challenge is typically taken on Friday). So taking the code challenge on Tuesday is meant to serve as a baseline for the student and instructors to know where there are gaps in understanding. This gives students who learn at different paces an opportunity to see what concepts they need to focus on in the coming days with feedback directly from an instructor. If the student doesn’t pass the code challenge by the 2nd Friday of the mod, they are able to take it one more time by the end of the mod alongside an instructor. At this point, if the instructor feels the student isn’t comfortable enough with the concepts to continue on, the student can repeat the mod. Students are able to repeat a single mod 2 more times throughout the entire program at their own discretion as well. The flexibility of this program allows for students in different circumstances to be set up for success even as things come up.</p><h3>Constructive Feedback</h3><p>While the feedback from instructors to students is an important part of learning, feedback from students to staff is crucial in making sure an educational program like this is really serving their students. Besides all of the typical surveys that the program required students to participate in, we were also asked to participate in daily end-of-day surveys on the Denver campus. The questions were:</p><ol><li>How are you feeling (1–4)?</li><li>What was something you learned today?</li><li>Any feedback for the staff?</li></ol><p>Encouraging students to provide feedback daily is something not many schools do and when the staff acknowledges that feedback, it gives students the feeling that they are “in-touch” with what’s going on.</p><p>Besides incorporating feedback from the surveys, the Denver staff also takes student requests for lessons every morning during stand-up before putting out the schedule for the day. This allows for students to request lessons to reinforce concepts they are still uncomfortable with or sometimes learning a new technology that may be relevant for students incorporating in a project. I felt that this dynamic enabled students to own their learning experience with constant support from the staff.</p><h3>Authenticity</h3><p>One of the things I love about the Flatiron School is how much they encourage students and staff alike to be authentic. Some parting advice from one of the lead instructors, Kyle Coberly, at our graduation ceremony was to bring who we were and our diverse backgrounds before starting this program into the tech industry and our next roles after graduation.</p><p>Alongside authenticity, I think vulnerability also plays a big role into being successful coming out of this program, and the weekly rituals that exemplified this were Thankful Thursday and Feelings Friday. On Thursdays everyone would have an opportunity to share something they were grateful for that week — a helpful instructor or classmate, the warm weather. On Fridays, we were encouraged to share our thoughts and emotions in groups, openly and without judgment. Each person had the opportunity to speak without interruption or commentary and with the assumption that everything said would not leave the room. This was a huge aspect of the Flatiron School culture that I cherished. It gave me a lot of perspective throughout the program because as students, we were all on the same rollercoaster, but every person has a unique experience. The staff participated in these rituals too, and it gave us some insight into what goes into the job and how it affects their own lives. By participating in these forums for positivity and vulnerability from the start of the program, I felt more comfortable and courageous when it came to asking for help and helping others.</p><p>As far as the curriculum goes, learning Ruby, Rails, HTML, CSS, JavaScript, and React were a solid foundation to have coming out of the program. I found the online lessons on learn.co were sometimes helpful to reinforce material, though as part of the Denver curriculum, not required. I got the most out of live lessons/instruction, which were also not required to attend, because I was able to ask questions immediately, though most lessons were recorded so you could look back at them later or refer to ones recorded from previous cohorts. Additional instruction outside of the designated curriculum was also fairly common and I received introductory instructional lessons on technologies like SASS, Node.js, Express.js, Knex.js, Objection.js, Django, and more.</p><p>Overall, I am extremely happy with the out-of-the-box educational experience that I received from the Flatiron School in Denver and looking forward to the next phase of my journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ErjkuvqdhjIi7-NK3q458g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=402ad2be3ca2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-step guide for implementing API Authentication with JSON Web Tokens (JWT)]]></title>
            <link>https://kristine-a-du.medium.com/step-by-step-guide-for-implementing-api-authentication-with-json-web-tokens-jwt-626f50449e4c?source=rss-b59327ce54ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/626f50449e4c</guid>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[junior-developer]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[authentication]]></category>
            <dc:creator><![CDATA[Kristine Du]]></dc:creator>
            <pubDate>Tue, 12 May 2020 21:49:52 GMT</pubDate>
            <atom:updated>2020-05-12T21:49:52.267Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*9pWUdYPAwCQoWdEnvZli4A.jpeg" /></figure><p>Authentication can seem daunting to implement in an application if you haven’t done it because as a junior software engineer you may question, “What do I know about cybersecurity?” Well, after implementing token-based authentication using JSON Web Tokens in 2 different technologies, it’s actually pretty straightforward and only a basic knowledge of internet security is necessary. I’ll break down the steps for implementing JWT and provide some code snippets of how I implemented it in both a Ruby on Rails backend and a Node.js/Express.js backend.</p><h4>1. Install a <a href="https://jwt.io/">JWT library</a> for your backend framework</h4><p>There are JWT libraries for the most used languages and a couple of frameworks which is fantastic as it generalizes and simplifies this whole process if you’re working in a a new technology.</p><p><a href="https://github.com/progrium/ruby-jwt">JWT for Ruby</a>: gem install jwt</p><p><a href="https://github.com/auth0/node-jsonwebtoken">JWT for Node.js</a>: npm install jsonwebtoken</p><h4>2. Add logic for when a user logs in successfully</h4><p>A user should only be assigned a token when they are verified as a user in the database with matching login credentials. This logic should be included in the server route action that is handled when a user tries to login on the frontend.</p><p>In Rails, I’ve created a login action within a Logins controller with the following code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w1GW7eU5pMONCDMxKPcyTg.png" /></figure><p>The token assignment is within a few nested conditional statements so that the token is only generated when the user’s login name and password are matched.</p><p>*NOTE: For storing secure passwords, implement bcrypt to hash and compare plain text passwords.</p><p>For <a href="https://github.com/codahale/bcrypt-ruby">Ruby bcrypt</a>: gem install bcrypt</p><p>For <a href="https://www.npmjs.com/package/bcrypt">Node.js bcrypt</a>: npm install bcrypt</p><h4>3. Assign a payload</h4><p>Now, breaking down the code above, once we have a matched user, we assign a payload containing information about the user that should be stored in the token. The payload is an object that will be turned into a JSON string and usually holds a unique identifier for the matched user like the ID.</p><p>Here’s another example of the payload assigned in a POST route in my Express.js backend:</p><pre>const payload = {<br>   id: user.id,<br>   display_name: user.display_name,<br>   username: user.username<br>}</pre><h4>4. Generate a secret key</h4><p>A secret key is required when creating a JWT, is unique and should be kept private. This is encoded in the token to ensure that the token is more difficult to replicate. Keep in mind that a token can be easily and maliciously duplicated if someone else has access to this key.</p><p>In Rails, the secret key can be generated for the application using:</p><pre>secret_key = Rails.application.secret_key_base</pre><p>For Node.js, I used <a href="https://nodejs.org/api/crypto.html">Node’s crypto library</a>:</p><pre>require(&#39;crypto&#39;).randomBytes(64).toString(&#39;hex&#39;)</pre><p>This generates a complex string which I saved to an environment variable in my .env file.</p><p>*NOTE: If this key is stored in plain text on your application, make sure it not pushed to a public repo with Git! Add the .env to a .gitignore file before pushing up to a remote repo.</p><h4>5. Create the token</h4><p>Now that you have a payload and secret key, you can create the encoded token using JWT’s built-in methods.</p><p>In Rails:</p><pre>token = JWT.encode(payload,secret_key)</pre><p>In Express.js:</p><pre>const jwt = require(&#39;jsonwebtoken&#39;)<br>const token = jwt.sign(payload,process.env.SECRET_KEY)</pre><p>This token is then sent as a response to the user on successful login.</p><h4>6. Save the token on user login</h4><p>Once the token is generated, it would typically be saved to the user’s browser storage or cookies as there are pros and cons to each. I’ve found that setting the token in local storage is very simple to do, but highly suggest researching this further. In a JavaScript frontend, after receiving the response from the fetch call, setting the token to local storage looks like:</p><pre>localStorage.setItem(&#39;token&#39;, token)</pre><h4>7. Authenticate the token to provide authorization</h4><p>When sending a fetch request to access API data, the token must be sent in the request headers. JWT is a bearer type of token and it should be sent in an ‘Authorization’ header i.e.</p><pre>fetch(`${apiURL}/scores`, {<br>   headers: {<br>      &#39;Authorization&#39;: `Bearer ${localStorage.token}`<br>   }<br>})</pre><p>When this request is received by the API, an authentication method should be called on the route before the route action is invoked so that the token being sent can be verified.</p><p>In Express.js, this looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eDRnwwHyk-oDuQVeynJ7lg.png" /></figure><p>Here the payload is returned as the user and passed on to the request object.</p><p>In Ruby, the payload can be retrieved using the following:</p><pre>payload = JWT.decode(token,secret_key)[0]</pre><p>In those 7 steps, we’ve added authentication to an API with JWT. Having done this first in Rails and then Express allowed me to connect the dots, though I’m sure there are variances when moving into other languages and frameworks.</p><p>This was a great article that I referenced when implementing JWT in Node.js/Express.js — <a href="https://alligator.io/nodejs/jwt-expressjs/">https://alligator.io/nodejs/jwt-expressjs/</a></p><p>Looking forward to testing out these steps in Python/Django!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=626f50449e4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Full-Stack Application Solo: Reminders to Self]]></title>
            <link>https://kristine-a-du.medium.com/building-a-full-stack-application-solo-reminders-to-self-8af6dde69297?source=rss-b59327ce54ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/8af6dde69297</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Kristine Du]]></dc:creator>
            <pubDate>Wed, 22 Apr 2020 15:38:09 GMT</pubDate>
            <atom:updated>2020-04-22T15:38:09.194Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*3dmEHGL8QUUvcD3fqAQCjA.png" /></figure><p>In the last 3–4 weeks, I’ve been focused on my first solo project, building a full-stack web application on my own using what I’ve learned from 9 weeks in the Flatiron School Software Engineering Immersive program. This experience gave me some insight into a few things that I needed to keep reminding myself to do, so I’m writing them down to look back on for future projects:</p><h4>It’s okay to ask for help</h4><p>Working on a personal or solo project can sometimes feel like you need to do it all by yourself which can be pretty isolating. It was not uncommon for me to find myself letting a few hours or a day pass by researching a seemingly simple question or functionality. I’m sure every developer has experienced this, but I soon realized that sometimes there were issues that came up where I just didn’t know what I didn’t know. Luckily, one of my coaches checked in on me to see how I was faring and it gave me the opportunity to ask her a question. She instantly knew the problem I was having and the 1 line of code I needed to resolve it. She mentioned another student had the same issue and it made me realize that asking for help or posing questions in a group setting may also help others in the process.</p><p><strong>There’s no such thing as a stupid question.</strong></p><p>It’s a cliché, but having this mindset has allowed me to better understand things that would have taken me much longer to learn if I hadn’t asked someone to explain it to me. After spending some time googling on your own and you feel like you’re spinning your wheels trying to find the solution, reaching out to peers is the next step to take.</p><h4>Take breaks</h4><p>Working on something you’re really excited about can make time fly by, and I’d definitely gone a few hours without looking up from my screen. Even when I was tired and frustrated, I felt compelled to keep working just to get more done. I realized that I was probably not working as efficiently as I could have been if I had gotten up from my desk and shifted my energy every hour. By the end of a full day working on my project, I felt drained. The next morning, I would find myself inspired and would immediately know what to do or try next to fix an issue that had taken up so much of my time to address.</p><p><strong>Disconnect and shift focus.</strong></p><p>Getting up and doing something else for a few minutes like a couple of light exercises allowed my brain to reset and re-energize. Doing this more often would probably feel less like burn out at the end of a day. Incorporating more breaks brings fresh eyes to your work more often which will benefit you mentally and the project overall.</p><h4>Thin, vertical slices</h4><p>This agile programming concept is mentioned a lot in our program and is a great pointer especially when it comes to solo projects. We can be very ambitious in the things we want to build in our apps, and it can get overwhelming when it feels like we’ve spent so much time and energy into one big thing, like setting up your database, that doesn’t really feel like it amounted to something that can actually be used. Divvying up a project into “thin, vertical slices” is the idea that you want to get all the pieces of one feature working so that you can release a Minimum Viable Product (MVP).</p><p><strong>Appreciate the wins.</strong></p><p>Sometimes it seemed like breaking up my project in this way was going to lead to rework, I realized that every time I was finishing up a slice and having something to show for it on the Client side was a noteworthy accomplishment. These seemingly small wins are the fuel that kept me from feeling like I wasn’t progressing. Instead, I felt a burst of energy and excitement from getting this functionality to work and invigorates me to keep going. It’s definitely one of the highs I enjoy from programming.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*d3VQcuUqBtHz7pLeOuGjtw.png" /><figcaption><a href="https://blogs.adobe.com/agile/2013/09/27/splitting-stories-into-small-vertical-slices/">https://blogs.adobe.com/agile/2013/09/27/splitting-stories-into-small-vertical-slices/</a></figcaption></figure><h4>Stop committing directly to master</h4><p>Remembering to follow Git best practices went out the window for me while building this application by myself. When collaborating, it’s easy to remember to create and checkout a branch because you’re trying to avoid conflicts with other team members’ code, but working on a solo project, it just seems convenient to push directly to master.</p><p><strong>This is a bad habit to break!</strong></p><p>There were a few times that committing code directly to master left a lot of room for unforeseen bugs, and by the time I had caught them in testing, I had already pushed all this new code that had caused the issues and I no longer had a fully functional branch with working code that I could easily compare to.</p><p>I learned a lot from my first solo full-stack application and I’m looking forward to continually improving myself when building future projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8af6dde69297" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Simple Workflow for Collaborating via GitHub]]></title>
            <link>https://kristine-a-du.medium.com/a-simple-workflow-for-collaborating-via-github-129c26aca4e2?source=rss-b59327ce54ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/129c26aca4e2</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[collaboration]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <dc:creator><![CDATA[Kristine Du]]></dc:creator>
            <pubDate>Tue, 31 Mar 2020 16:59:15 GMT</pubDate>
            <atom:updated>2020-11-10T19:11:43.217Z</atom:updated>
            <content:encoded><![CDATA[<p>Working with a partner or in a group on a project is great practice for using Git and GitHub. As GitHub is widely used for collaborating on open source projects and within companies, I’d recommend getting familiar with it as soon as possible. Check out my post on <a href="https://medium.com/@kristine.a.du/git-and-github-for-beginners-written-by-a-n00b-ce3190bbf6b6?source=your_stories_page---------------------------">Git and GitHub for Beginners</a> for an intro to some basic terminology and useful Git commands.</p><h3>Getting Started with Collaboration</h3><p>Make sure you have <a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git">git installed</a> and that you have created an account on <a href="https://github.com/login">GitHub</a>.</p><p><strong>Starting your own project:</strong></p><ol><li>Initiate git to create a local repository within the project directory using git init</li><li><a href="https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-new-repository">Create a new repository</a> on GitHub</li><li><a href="https://help.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line">Link the remote repository</a> on GitHub to your local repository</li><li><a href="https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository">Add Contributors</a> to repository via Settings</li><li>Collaborators should <a href="https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository">clone the repo</a> to their create a local repository using git clone repo-link.git</li></ol><h3>Doing work &amp; updating GitHub</h3><p>Once you’ve got your local repository open, start with these steps to begin working on the project:</p><ol><li>Create and start working on a local branch — git checkout -b branch-name</li><li>Make changes in working directory</li><li>Add changes to staging — git add .</li><li>Commit changes git commit -m &quot;Write changes here.&quot;</li><li>Push changes to GitHub branch — git push origin HEAD</li><li>Create Pull Request to merge commit(s) to the main branch</li><li>Another collaborator reviews, resolves conflicts (if any), and merges PR</li><li>Switch to local main branch git checkout main</li><li>Pull down main changes from GitHub to local git pull origin main</li><li>Delete branch on GitHub &amp; local if desired.</li></ol><p>Repeat these steps as many times as necessary. Steps 2–4 can also be repeated in its own loop as it is important to commit often when you have working code. This will allow you to be descriptive in the changes that you’ve made and revert back to previous commits of working code if ever needed.</p><p>This is a great resource that was passed on to me to help beginners make their first contribution to an open source project on GitHub: <a href="https://github.com/firstcontributions/first-contributions">https://github.com/firstcontributions/first-contributions</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=129c26aca4e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git and GitHub for Beginners (written by a n00b)]]></title>
            <link>https://kristine-a-du.medium.com/git-and-github-for-beginners-written-by-a-n00b-ce3190bbf6b6?source=rss-b59327ce54ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce3190bbf6b6</guid>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Kristine Du]]></dc:creator>
            <pubDate>Tue, 10 Mar 2020 20:22:00 GMT</pubDate>
            <atom:updated>2020-08-17T23:19:50.144Z</atom:updated>
            <content:encoded><![CDATA[<p>The idea of learning how to code had crossed my mind for years, but has only come to fruition the start of 2020. As a beginner programmer, learning about Git and understanding how to use it alongside GitHub can be pretty intimidating. I’ve had a GitHub account since 2015, but I’ve only really just started to understand and use Git in the past 2 weeks. I’m going to break down what I’ve learned about it so far.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iHgLhRImp4ufuU8jAlNcxQ.jpeg" /></figure><h3><strong>Git vs. GitHub: What’s the difference?</strong></h3><p><a href="https://git-scm.com/"><strong>Git</strong></a> is a <strong>decentralized version control system</strong>. A version control system (VCS) allows you to track changes to files. An important thing to keep in mind is that Git, being a decentralized (or <a href="https://www.atlassian.com/blog/software-teams/version-control-centralized-dvcs">distributed</a>) VCS, is tracking changes <em>locally</em><strong>, </strong>meaning the changes are tracked on the machine being used (i.e. your laptop).</p><p><a href="https://github.com/"><strong>GitHub</strong></a> is a <strong>remote host for Git repositories</strong>. A repository is essentially all of the versions of files Git is tracking within a directory. GitHub is a way to store and access your tracked project directories and files online. GitHub has tons of other <a href="https://github.com/features">features</a> that make it one of the most widely used technologies in the development community.</p><p>The main takeaway here is that Git and GitHub are <strong>NOT the same thing! </strong>They are 2 separate technologies. We can use Git with other remote host repositories like <a href="https://gitlab.com/">GitLab</a> or <a href="https://bitbucket.org/">Bitbucket</a>.</p><figure><img alt="Git commands and stages" src="https://cdn-images-1.medium.com/max/721/1*pARvKdz7kxiZ1KmhFtm9mw.png" /><figcaption>Quick snapshot combining the Git commands with the stages</figcaption></figure><h3><strong>The Basic Terminology</strong></h3><p><strong>repository (or repo)</strong>: collection of stored Git tracked files with versions and changes. These can be local and/or remote.</p><p><strong>fork</strong>: a copy of a remote repository where you can make changes and collaborate without affecting the original repository.</p><p><strong>clone</strong>: a copy of a remote repository that can be stored and updated locally.</p><p><strong>branch</strong>: a version of a repo pointing to a set of changes. The default/main branch is often called the master branch, and it is best practice not to make updates directly on the master branch. Additional branches should be created to duplicate the code and test prior to updating the master branch.</p><p><strong>working directory: </strong>the active branch changes are currently being made to</p><p><strong>commit</strong>: a snapshot of the revisions made. A single commit will include all the latest changes that have been staged.</p><p><strong>staging area:</strong> where changed files are added and tracked prior to committing.</p><p><strong>pull request (PR)</strong>: a request indicating to collaborators on a repository that a set of changes/commits have been made and are ready for review to be included in another branch</p><p><strong>merge</strong>: the act of integrating changes from one branch to another</p><h3><strong>Useful Git Commands</strong></h3><pre>git init</pre><p>Creates a repository within the directory it is initiated in and tracks changes for all files within that directory.</p><pre>git clone [repo-link].git</pre><p>Clones a remote repository to a local directory.</p><pre>git checkout master<br>git checkout -b [branch-name]</pre><p>Switches the current/active branch to the indicated branch i.e. master.<br>The -b flag creates a new branch i.e. [branch-name] then switches to the newly created branch.</p><pre>git branch</pre><p>Displays a list of local branches.</p><pre>git status</pre><p>Displays current branch, whether the branch is synced with the remote repo, any files that have been changed within the working directory, and files that are staged/ready to be committed.</p><pre>git add .<br>git add [file-name.html]</pre><p>Adds changed files from the working directory to the staging area. Including . will move all changed files to staging, but you can add files individually, i.e. [file-name.html], in order to stage and commit changed files in smaller chunks so that your commits can be more specific.</p><pre>git commit -m &quot;[Add message about changes.]&quot;</pre><p>Creates a commit for all changes that were staged. Commits require a message to be added to indicate what changes have been made to the files.</p><pre>git push origin HEAD</pre><p>Pushes local commits to the active corresponding branch in the remote repo. origin represents the original repo the local repo is cloned from. head represents the current working directory. Not including head will assume the repo’s default branch which is typically master, so it’s important to include this!</p><pre>git pull origin master</pre><p>Syncs current branch with the remote master branch. All local changes should be committed before the branch can be synced.</p><p><em>For a full list of commands, check out </em><a href="https://git-scm.com/docs/git#_git_commands"><em>https://git-scm.com/docs/git#_git_commands</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce3190bbf6b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>