<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Efren Marin</title>
    <description>The latest articles on DEV Community by Efren Marin (@efrenmarin).</description>
    <link>https://dev.to/efrenmarin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F307882%2F7d98c22b-a078-4cd3-abb0-59dd30f51f61.png</url>
      <title>DEV Community: Efren Marin</title>
      <link>https://dev.to/efrenmarin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/efrenmarin"/>
    <language>en</language>
    <item>
      <title>Workflows on how to be more efficient with your code</title>
      <dc:creator>Efren Marin</dc:creator>
      <pubDate>Thu, 16 Jan 2025 04:09:02 +0000</pubDate>
      <link>https://dev.to/efrenmarin/-of7</link>
      <guid>https://dev.to/efrenmarin/-of7</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/efrenmarin" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F307882%2F7d98c22b-a078-4cd3-abb0-59dd30f51f61.png" alt="efrenmarin"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/efrenmarin/format-your-code-using-prettier-like-a-pro-fj8" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Format Your Code Using Prettier Like a Pro&lt;/h2&gt;
      &lt;h3&gt;Efren Marin ・ Jan 8&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tooling&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Format Your Code Using Prettier Like a Pro</title>
      <dc:creator>Efren Marin</dc:creator>
      <pubDate>Wed, 08 Jan 2025 06:17:01 +0000</pubDate>
      <link>https://dev.to/efrenmarin/format-your-code-using-prettier-like-a-pro-fj8</link>
      <guid>https://dev.to/efrenmarin/format-your-code-using-prettier-like-a-pro-fj8</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdufehoccu7j616cpg5ft.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdufehoccu7j616cpg5ft.png" alt="Formatting Cartoon" width="800" height="1218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don't be like this guy—don’t be a schmuck.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Formatted Code Is Needed
&lt;/h2&gt;

&lt;p&gt;Formatting helps structure the lines of code you write making it easier to read and understand. This is crucial when working on a codebase with multiple developers, all with their own style and preference on how their code is structured. Having a uniformed formatted codebase helps prevent headaches when merging and creates a standard that you and your team can build on. &lt;/p&gt;

&lt;p&gt;There are several ways to set up a formatting template for yourself and your team. In this article, we’ll explore one of the more popular options: Prettier.&lt;/p&gt;

&lt;p&gt;According to the State of JS 2021 survey, 83% of respondents regularly use Prettier as their formatter of choice, a 13% increase from the previous year's survey. Many prominent teams—such as those at Facebook, Webflow, Jest, Dropbox, Spotify, and PayPal—use Prettier to ensure consistent formatting in their codebases.&lt;/p&gt;

&lt;p&gt;Prettier can be configured and run in multiple ways. In this example, I’ll demonstrate how to set up Prettier with a Git hook for automation in VS Code. For more examples and configurations, visit &lt;a href="https://prettier.io/" rel="noopener noreferrer"&gt;Prettier’s documentation&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Before You Start
&lt;/h2&gt;

&lt;p&gt;While it’s not required, it’s helpful to understand the options you’ll be configuring and what they do. You’ll need to create two files and place them at the root level of your project. Keep in mind that these formatting options are project-specific, so you’ll need to repeat this process for each new project. These files will contain the options you can choose, and you can modify or remove options that don’t fit your project’s needs.&lt;/p&gt;




&lt;h3&gt;
  
  
  .prettierrc
&lt;/h3&gt;

&lt;p&gt;This file, located at the root level of your project, defines the base formatting rules for Prettier. It uses a JSON structure and can be tailored to your team’s standards. Here’s an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftbdkjsfeugvqoia43vgq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftbdkjsfeugvqoia43vgq.png" alt=".prettierrc" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  .editorconfig
&lt;/h3&gt;

&lt;p&gt;This file ensures consistency in your editor settings even before Prettier runs. It also covers options that &lt;code&gt;.prettierrc&lt;/code&gt; does not. Here’s an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8ztvfnv0m3m8dxfxlnw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8ztvfnv0m3m8dxfxlnw.png" alt=".editorconfig" width="800" height="623"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Setting Up the Workflow
&lt;/h2&gt;

&lt;p&gt;For ease of use, both files can be copied at the end of the article. Once you’ve created and configured the &lt;code&gt;.prettierrc&lt;/code&gt; and &lt;code&gt;.editorconfig&lt;/code&gt; files, you can proceed. Install these three npm packages to streamline the formatting process:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install --save-dev prettier lint-staged husky&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then initialize Husky&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx husky init&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;These steps accomplish the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install Prettier for formatting.&lt;/li&gt;
&lt;li&gt;Install lint-staged to format only staged files before committing.&lt;/li&gt;
&lt;li&gt;Install Husky to set up Git hooks for automation.&lt;/li&gt;
&lt;li&gt;Initialize Husky, which creates the necessary dependencies and a pre-commit file.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Configuring New Files
&lt;/h2&gt;

&lt;p&gt;Two additional files need configuration: &lt;code&gt;pre-commit&lt;/code&gt; and &lt;code&gt;.lintstagedrc&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  pre-commit
&lt;/h3&gt;

&lt;p&gt;This file, automatically created by Husky, guides the automation process. It is located inside the Husky folder created during initialization. Configure it as shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwvw9gl582wh9e99sk4rb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwvw9gl582wh9e99sk4rb.png" alt="pre-commit" width="800" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  .lintstagedrc
&lt;/h3&gt;

&lt;p&gt;Create this file (with no extension similar to .editorconfig and .prettierrc) in the root project folder. It narrows the scope of files Prettier formats through the Git hook. Below is an example, but you can adjust it based on your project’s file types:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa8vr5kj22p9r56qqfppn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa8vr5kj22p9r56qqfppn.png" alt=".lintstagedrc" width="686" height="257"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Testing the Workflow
&lt;/h2&gt;

&lt;p&gt;Once all four files are in place—&lt;code&gt;.prettierrc&lt;/code&gt;, &lt;code&gt;.editorconfig&lt;/code&gt;, &lt;code&gt;.lintstagedrc&lt;/code&gt;, and &lt;code&gt;pre-commit&lt;/code&gt;—you can test the workflow.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make a simple formatting change to a .js file (add unnecessary spaces or indents, for example).&lt;/li&gt;
&lt;li&gt;Stage your changes:
&lt;code&gt;git add -A&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Commit with a test message
&lt;code&gt;git commit -m "Testing formatting workflow"&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If everything was set up correctly, your terminal should display a success message, and the formatting changes will be automatically applied.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1w2ukxehsd9rm6rq5lvo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1w2ukxehsd9rm6rq5lvo.png" alt="Console example" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  That's it!
&lt;/h2&gt;

&lt;p&gt;You now have a simple yet effective way to harness Prettier and git hooks to automate the formatting of your code. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExa2VxYmcxcWYxMmt4bXQ0Y25vamNtZjB4eWd2NHA0dnU3dHZ5YnZneCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9cw/77fQmGTl15YaRLiOOU/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExa2VxYmcxcWYxMmt4bXQ0Y25vamNtZjB4eWd2NHA0dnU3dHZ5YnZneCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9cw/77fQmGTl15YaRLiOOU/giphy.gif" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’d love to hear your thoughts! Let me know in the comments if this was helpful or if you encounter any issues—I’m here to help!&lt;/p&gt;




&lt;h3&gt;
  
  
  Copy Paste File Examples
&lt;/h3&gt;

&lt;p&gt;.prettierrc&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "arrowParens": "always",
  "bracketSameLine": false,
  "bracketSpacing": true,
  "embeddedLanguageFormatting": "auto",
  "endOfLine": "lf",
  "htmlWhitespaceSensitivity": "css",
  "insertPragma": false,
  "jsxSingleQuote": false,
  "printWidth": 80,
  "proseWrap": "preserve",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "semi": true,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "es5",
  "useTabs": false,
  "vueIndentScriptAndStyle": false
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;.editorconfig&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Top-most EditorConfig file
root = true

# Global settings
[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Overrides
[*.md]
trim_trailing_whitespace = false
max_line_length = off

[*.yml]
indent_style = space
indent_size = 2

[*.ts]
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab

[*.html]
indent_size = 2

[*.json]
indent_size = 2

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>tutorial</category>
      <category>tooling</category>
    </item>
    <item>
      <title>How to Take Your Git Commit Messages to The Next Level With a Commit Template</title>
      <dc:creator>Efren Marin</dc:creator>
      <pubDate>Wed, 21 Dec 2022 05:32:31 +0000</pubDate>
      <link>https://dev.to/efrenmarin/how-to-take-your-git-commit-messages-to-the-next-level-with-a-commit-template-3h47</link>
      <guid>https://dev.to/efrenmarin/how-to-take-your-git-commit-messages-to-the-next-level-with-a-commit-template-3h47</guid>
      <description>&lt;p&gt;Whether you're working on a solo project or part of a development team, you will have had multiple commit messages that don't always make sense. Whether it's the infamous "WIP" or a vague description that doesn't encapsulate the whole story, we're all guilty of this. &lt;/p&gt;

&lt;p&gt;Allow me to share what has worked for me and what I've introduced to my development team for our daily git commits. With some planning beforehand, this will show you how to set up a git commit template for cleaner and concise messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Having a commit template embedded into your workflow not only allows for more detailed and precise commit messages but it also sets a standard for teams to follow. &lt;/p&gt;

&lt;p&gt;I'll break down the steps needed into segments.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to create a template file that git can use.&lt;/li&gt;
&lt;li&gt;How to set up a custom template on your machine.&lt;/li&gt;
&lt;li&gt;How to actually use it. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Creating a Template
&lt;/h3&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1024172483501539333-663" src="https://platform.twitter.com/embed/Tweet.html?id=1024172483501539333"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1024172483501539333-663');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1024172483501539333&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;Is your pet peeve receiving a pull request with an enormous amount of files changed and non-descriptive commit messages? Yeah, mine too. I know I'm not alone on this one so let's begin by creating our template to help prevent this.&lt;/p&gt;

&lt;p&gt;We will be loosely following &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/" rel="noopener noreferrer"&gt;Conventional Commits&lt;/a&gt; so if you are unfamiliar with this, I strongly suggest you give them a click. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrahp870nh1gj444fn89.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrahp870nh1gj444fn89.gif" alt="Let's Do This" width="480" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First start off by creating a .txt file and naming it something precise like &lt;code&gt;commitTemplate.txt&lt;/code&gt; for example. Place this file somewhere within your folder structure where you can easily access it. I placed mine in my development folder where my repo's are cloned. &lt;/p&gt;

&lt;p&gt;Now populate your commit template file. You can use my example, or modify it to what you and your team need. It's important to know a couple caveats to this template. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One, any line that starts with &lt;code&gt;#&lt;/code&gt; will not appear in your final commit message but will show up as commented out in the template. If it does not include a &lt;code&gt;#&lt;/code&gt; then you'll be able to type in that line.&lt;/li&gt;
&lt;li&gt;Two, for the sake of &lt;code&gt;git log --oneline&lt;/code&gt; keep your title under 50 characters. &lt;/li&gt;
&lt;li&gt;Three, the body and footer can be up to 72 characters per line.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The template I'm sharing includes a section for the developer to type in their commit message as well as the team standard below for reference. Okay, now with that understood, here is the template we'll be using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 
#########################
# Start of Commit Message
#########################
#
#
# Title

# Body



# Footer

#
#
#######################
# End of Commit Message
#######################
#
#
# Keep each commit line under 50 characters
# Following conventional commits 1.0.0 
#
# Use the prefix naming convention:
# fix: patches a bug in the codebase
# feat: introduces a new feature to the codebase
# refactor: only used when refactoring code
# docs: used when modifying/creating docs
# build: when preparing for a build
#
# Commits should follow the format below:
#
# [Title]
# &amp;lt;type&amp;gt;: In under 50 characters, description of the commit
#
# [Body]
# Explain in detail what was done in this commit and 
# what this is supposed to achieve. Keep this section
# under 72 characters per line. 
# 
# [Footer]
# Use this section to add any PR/Ticket numbers that this
# commit is solving or any co-authors. If none of these apply, # leave it empty.
# 
#
#
#
#
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://i.giphy.com/media/OeKdcKFmF0xLhetqif/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/OeKdcKFmF0xLhetqif/giphy.gif" alt="Now What" width="480" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting Up Our Template
&lt;/h3&gt;

&lt;p&gt;With the template file created and populated, we now need to point Git to it whenever we want to commit a message. &lt;/p&gt;

&lt;p&gt;From your terminal, in this case I'll be using VSCode's terminal, type in the following command and press enter.&lt;br&gt;
&lt;code&gt;git config --global commit.template ~/commitTemplate.txt&lt;/code&gt;&lt;br&gt;
The only portion of this snippet that might be different is &lt;code&gt;commitTemplate.txt&lt;/code&gt; assuming you named your file differently. Running this command points Git to your template file and will work globally for any project you work on using your machine.&lt;/p&gt;

&lt;p&gt;Now let's check to make sure this was processed by typing in &lt;code&gt;git config --global --list&lt;/code&gt;. This will now show you that commit.template is assigned to the file path where your template is. &lt;/p&gt;

&lt;p&gt;Finally, to configure this to work with VSCode we will pass another command to the terminal. This time we will use &lt;code&gt;git config --global core.editor "code --wait"&lt;/code&gt;. This handy line will make it so when we are ready to commit, it will open a new tab within VSCode so we can type in our message. Again, check for completion by running &lt;code&gt;git config --global --list&lt;/code&gt; again.&lt;/p&gt;
&lt;h3&gt;
  
  
  How To Use Our Template
&lt;/h3&gt;

&lt;p&gt;So you've created a commit template, set it up on your machine, and now it's time to use it! &lt;/p&gt;

&lt;p&gt;Simply go to one of your projects and get ready to make a commit. In order for this template to populate, your commit command needs to be &lt;code&gt;git commit&lt;/code&gt; only. Once you type this in and press enter, a new tab will populate with your template. If you decide you are not ready for a commit, simply leave it empty and close the tab. Your terminal will let you know &lt;code&gt;Aborting commit due to empty commit message&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9nq9s289z63dvfjvb9yh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9nq9s289z63dvfjvb9yh.png" alt="Commit Template Editing" width="800" height="1252"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Here we have populated the template with a title, body, and footer. As you can see the lines that began with &lt;code&gt;#&lt;/code&gt; are commented out and we type in the empty lines we designated before. So your commits will really look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;feat: Included user feedback modal

Created a fully functional modal with a 
form for users to fill out if they have 
feedback. This feature can be accessed 
from the home page menu bar on the top
right with a click. 

PR#: 454
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you're happy with your notes, simply save and close the tab and it will push your commit message. Simple as that!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/xUOxfecWsLzAYSUP6w/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/xUOxfecWsLzAYSUP6w/giphy.gif" alt="Now I Get It" width="480" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;There are no right or wrong items to include in your commit template. Every development team works off of different ideologies, but every development team can gain an advantage by having a commit template. Not only does it create a commit message standard format, but it also helps produce more detailed and succinct messages. &lt;/p&gt;

&lt;p&gt;Takes about 5 minutes to implement this in your local environment so what do you have to lose? If you gained some value from this, I'd be happy to hear how it goes and your experience using it.  &lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>productivity</category>
      <category>git</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Great Coding Websites and Games for Kids of All Ages</title>
      <dc:creator>Efren Marin</dc:creator>
      <pubDate>Thu, 17 Nov 2022 17:00:00 +0000</pubDate>
      <link>https://dev.to/efrenmarin/7-great-coding-websites-for-kids-of-all-ages-hh4</link>
      <guid>https://dev.to/efrenmarin/7-great-coding-websites-for-kids-of-all-ages-hh4</guid>
      <description>&lt;h2&gt;
  
  
  How It Started
&lt;/h2&gt;

&lt;p&gt;As my work often spills over into time at home, my young son has started showing a lot of curiosity about programming. This sparked a quest to introduce him to coding in a fun, engaging way. We’ve explored a variety of resources—books, apps, YouTube channels, and subscription kits. Each has its perks, but we’ve found that interactive learning really stands out for retention. Getting hands-on experience seems to make all the difference! The more we explored, the more I ended up using these resources for fun and to sharpen my skills in a different way.&lt;br&gt;
 &lt;br&gt;
I’ve compiled a list of websites and games that offer a simple, engaging introduction to coding and development. The best part? They’re super easy to use and are great for building skills at any age, whether you’re just starting or looking to sharpen your expertise as a Software Developer.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Focused
&lt;/h2&gt;

&lt;h3&gt;
  
  
  CSS Diner | &lt;a href="https://flukeout.github.io" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5syzlti1vh3y35jnsv9u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5syzlti1vh3y35jnsv9u.png" alt="CSS Diner" width="800" height="580"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: Free&lt;/em&gt;&lt;br&gt;
A great introduction to CSS selectors using an interactive diner-style game. This free site is open source and offers 32 challenge levels all in the browser. If you're stuck on any level, there's even a useful 'Help' button that explains the problem and provides insight into the solution. &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Flexbox Froggy &amp;amp; Grid Garden | &lt;a href="https://flexboxfroggy.com" rel="noopener noreferrer"&gt;Flex Link&lt;/a&gt; | &lt;a href="https://cssgridgarden.com" rel="noopener noreferrer"&gt;Grid Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdh0loqo1nvs862ctsnx6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdh0loqo1nvs862ctsnx6.png" alt="Flexbox Froggy" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwtyqiangtqeepzb61ip.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwtyqiangtqeepzb61ip.png" alt="Grid Garden" width="800" height="415"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: Free&lt;/em&gt;&lt;br&gt;
These are the best visual representations of how both CSS Flexbox and  CSS Grid work. They both offer a fun and easy-to-understand way to learn these CSS methods. Flexbox has you helping a frog hop along a pond. Grid Garden has you helping a garden flourish on a grid. Flexbox Froggy has 24 challenge levels and Grid Garden has 28 challenge levels, both are free sites. &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  CSS Battle | &lt;a href="https://cssbattle.dev" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdbn7gsjfdx1xvrqutwd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdbn7gsjfdx1xvrqutwd.png" alt="CSS Battle" width="800" height="591"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: Free, Pro Upgrade option with monthly subscription&lt;/em&gt;&lt;br&gt;
There are so many amazing things that can be done with CSS on its own. This site puts your CSS knowledge to the test with a visual prompt and a side-by-side comparison as you work on your solution. There over 100 challenge levels to work through, all for free. There is a Pro version that gives you some quality-of-life additions if you want to expand on the free version. &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Programming Fundamentals
&lt;/h2&gt;

&lt;h3&gt;
  
  
  CodinGame | &lt;a href="https://www.codingame.com/home" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frlyk7f1cxtlnjmuf0cx1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frlyk7f1cxtlnjmuf0cx1.png" alt="Codin Game" width="800" height="417"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: Free&lt;/em&gt;&lt;br&gt;
If you're looking for an old school flash game approach then this is it. CodinGame gives you challenges based on game scenarios like traversing mountain tops, space shooters, zombies, and so many more options. You can pick a game scenario that tests a certain topic like loops or conditions and work through that game scenario. If you're up for it, there is also an element of competition for those who want to try their hand at it. Frequently hosts competitions with prizes and signing up is free!&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Code Monkey | &lt;a href="https://www.codemonkey.com" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstnoy6rqi3i69oif1w1k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstnoy6rqi3i69oif1w1k.png" alt="Code Monkey" width="800" height="694"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: Free Trial, offers monthly subscription&lt;/em&gt;&lt;br&gt;
This site is really aimed at feedback-based learning. Has a dashboard for either parents or teachers to see their kids or student's progress. When we tried this one, I did enjoy the reports generated based on my son's progress through the lesson plans. This allowed me to provide feedback on areas where he struggled. This site does have a monthly subscription but they do offer a generous trial period to see if it's for you.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  WarriorJS | &lt;a href="https://warriorjs.com" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ngu45qtn4zih79r0sj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ngu45qtn4zih79r0sj9.png" alt="Warrior JS" width="800" height="745"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: Free&lt;/em&gt;&lt;br&gt;
Looking for a text-based adventure to learn and improve your JavaScript skills? WarriorJS fits that bill to a T. Reminiscent of old-school text adventures, this free open-source site has you controlling a hero through multiple levels using JavaScript to interact. &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Lightbot | &lt;a href="https://lightbot.com" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6dv6kcdtbqk2ao01sr35.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6dv6kcdtbqk2ao01sr35.png" alt="Lightbot" width="800" height="729"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: Free version, offers a full paid version as well&lt;/em&gt;&lt;br&gt;
Okay, kind of cheating here because this is an app and not a website but this fun simple app explains fundamental topics in an easy-to-understand way. Aimed at newbies, Lightbot offers a perfect way to learn code on the go. According to their site, &lt;em&gt;"LightBot was designed with first-time coders. It's been played by over 20 million kids and has been used by tens of thousands of teachers worldwide."&lt;/em&gt;. They offer a free version and a paid full version so something for everyone. &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Brilliant | &lt;a href="https://brilliant.org/" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7s17zty668a057e6q9ud.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7s17zty668a057e6q9ud.png" alt="Brilliant" width="800" height="464"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: Free trial, offers monthly and annual plans&lt;/em&gt;&lt;br&gt;
A different approach to learning with Brilliant's platform of bite-sized lessons. They offer simple reward-based lessons that revolve around fundamentals at its core. Whether it's algorithms, math, or computer science basics, Brilliant has managed a way to make breaking into these topics a lot more approachable. It's offered online and via an app.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Games
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Human Resource Machine | &lt;a href="https://tomorrowcorporation.com/humanresourcemachine" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3q8ceyavjqtp867o6w8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3q8ceyavjqtp867o6w8.png" alt="Human Resource Machine" width="800" height="453"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: $14.99 not accounting for sales&lt;/em&gt;&lt;br&gt;
Program little office workers to solve puzzles. From the creators of World of Goo and Little Inferno. Easy way to pass hours working your way through employees while also sharpening your logic skills. Can be found on Steam and GOG.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Code Romantic | &lt;a href="https://prettysmart.itch.io/code-romantic" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjsn1ffgx75i9htt8o3g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjsn1ffgx75i9htt8o3g.png" alt="Code Romantic" width="800" height="418"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: $9.99 not accounting for sales&lt;/em&gt;&lt;br&gt;
If you want a story to go alongside your programming learning journey, then this game might just be the one.&lt;br&gt;
This game is a computer science puzzle visual novel wrapped in a science fiction love story. Definitely worth a try if you like visual novels. Can be found on Steam and GOG.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  7 Billion Humans | &lt;a href="https://tomorrowcorporation.com/7billionhumans" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc58dntw33q2qynmwmddb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc58dntw33q2qynmwmddb.png" alt="7 Billion Humans" width="800" height="447"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: $14.99 not accounting for sales&lt;/em&gt;&lt;br&gt;
The follow-up to the award-winning &lt;em&gt;Human Resource Machine&lt;/em&gt;, automate swarms of office workers to solve puzzles inside your very own parallel computer made of people. If you liked their previous game, this is more of it but with many more challenges. Can be found on Steam, GOG, Humble Store, Nintendo Switch, and iOS/Android.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  While True: learn() | &lt;a href="https://luden.io/wtl/" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwmgrgh7ym1dpof51gixo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwmgrgh7ym1dpof51gixo.png" alt="While True: learn()" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost: $12.99 not accounting for sales&lt;/em&gt;&lt;br&gt;
Including this title as an honorable mention as it does not directly deal with programming but does touch on basic machine learning concepts. You solve puzzles to build a cat-to-human translator in this quirky game. Can be found on all PC game marketplaces and consoles.&lt;/p&gt;

&lt;p&gt; &lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;Whatever method you decide to use as a medium to learn, it's important to have it be engaging, fun, and informative.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy Coding!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>frontend</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Deploy a Create-React-App to Github</title>
      <dc:creator>Efren Marin</dc:creator>
      <pubDate>Sun, 22 Nov 2020 05:06:14 +0000</pubDate>
      <link>https://dev.to/efrenmarin/deploy-a-create-react-app-to-github-lgc</link>
      <guid>https://dev.to/efrenmarin/deploy-a-create-react-app-to-github-lgc</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Overview&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;I find that being able to document and share my experiences helps to reinforce them. So as I dive deeper and deeper down the React Rabbit Hole, I want to help those who come across the question, "How do I deploy my Create-React-App onto my Github Repo and/or Github Pages?".&lt;/p&gt;

&lt;p&gt;As a preamble, I assume that you are already familiar with using the command line interface, using packages, and using Github.&lt;/p&gt;

&lt;p&gt;At the end of this, you will know how to have your CRA(Create-React-App) on your Github repository and also hosted on Github Pages. &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Create-React-App&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;First, start off by making sure you are in the folder where you want to install your application. In this example, I am going to be installing my CRA in my CRA-GH folder. You can learn more about initializing CRA from their documentation &lt;a href="https://reactjs.org/docs/create-a-new-react-app.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Using your Command Line Interface(CLI), initialize your application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Efren_Marin CRA-GH % npx create-react-app cra-gh-example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once your CRA is installed, go into the application file. In my example, the folder was called CRA-GH and my application was named cra-gh-example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Efren_Marin cra-gh-example % 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Test out your application by running the &lt;code&gt;npm start&lt;/code&gt; command.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;GH-Pages Package&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;First, make sure to close down your server instance using CTRL + C.&lt;/p&gt;

&lt;p&gt;Next, to incorporate Github you need to include the package with the command &lt;code&gt;yarn add gh-pages&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Efren_Marin cra-gh-example % yarn add gh-pages
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Git Initial Commit&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Once the gh-pages package is installed you need to add the changes and commit them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Efren_Marin cra-gh-example % git add -A
Efren_Marin cra-gh-example % git commit -m "First Commit"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Awesome! Now let's work on your repository.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Github Repository&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Create the repository that you want your CRA to be pushed to.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foaf6oukt32rsj9p5kxkw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foaf6oukt32rsj9p5kxkw.png" alt="Alt Text" width="800" height="524"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you create your repository, you'll be faced with many options on how to proceed. We will be choosing to push an existing repository from the command line. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv01os30r2fpa3u3fmulr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv01os30r2fpa3u3fmulr.png" alt="Alt Text" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can enter these commands one at a time in order or copy and paste.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Efren_Marin cra-gh-example % git remote add origin https://github.com/efrenmarin45/cra-gh-example.git
Efren_Marin cra-gh-example % git branch -M main
Efren_Marin cra-gh-example % git push -u origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt; &lt;/p&gt;

&lt;p&gt;                      That's it!&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3nbz36tcgx2o5wdcgmp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3nbz36tcgx2o5wdcgmp.gif" alt="Congratulations" width="480" height="400"&gt;&lt;/a&gt;&lt;br&gt;
     Well done! Your CRA is now live on your Github!&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwv4zp3md8kafhzc0swkf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwv4zp3md8kafhzc0swkf.png" alt="Alt Text" width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Deploying to Github Pages&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;You can also set up your CRA to deploy to Github Pages with a few simple steps. In this example I will be using VS Code.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Github Pages Source&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In order to direct your application to deploy directly to Github Pages, you need an address. On your settings tab in Github, scroll down until you come Github Pages.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Select the dropdown and set it to Main then select Save. Once this is done your address will be displayed for you to copy.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foyhg4kdqdsemttc2jke0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foyhg4kdqdsemttc2jke0.png" alt="Alt Text" width="800" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Code Editor&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Go into your project files using your code editor of choice and find your &lt;code&gt;package.json&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Add a key of &lt;code&gt;homepage&lt;/code&gt; and a value of the link to your Github Page. See line 5 for an example. This directs your application to deploy to that address once you run it. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5nihvh2qzkjukuy5o02n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5nihvh2qzkjukuy5o02n.png" alt="Alt Text" width="800" height="497"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Disregard the versions of the dependencies as they may have changed from the time of this screenshot&lt;/em&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Under the &lt;code&gt;scripts&lt;/code&gt; section, you will add these two lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"predeploy": "yarn build",
"deploy": "gh-pages -d build"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should look like this:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9m62bg1l33tkji4yqo1p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9m62bg1l33tkji4yqo1p.png" alt="Alt Text" width="726" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Finally commit your changes using these git commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Efren_Marin cra-gh-example % git add -A
Efren_Marin cra-gh-example % git commit -m "Added Github configuration"
Efren_Marin cra-gh-example % git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Build App&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Once the changes have been made and pushed to your repo, you need to build it using the command &lt;code&gt;yarn run deploy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Final Step&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Almost there! Go onto your Github and go to the settings tab. Scroll down to Github Pages and change the source from Main to gh-pages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6ko6v3dxltb6nsewwv47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6ko6v3dxltb6nsewwv47.png" alt="Alt Text" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Use the new link on Github Pages and you should see your CRA now hosted on Github Pages!&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6jah0o60uik9zhx6ep42.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6jah0o60uik9zhx6ep42.png" alt="Alt Text" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr55qqioozkno1fdft342.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr55qqioozkno1fdft342.gif" alt="You did it" width="444" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;In Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;There are multiple ways to set up your development environment and there are a vast amount of ways to go about it. This way has helped me streamline my process and I hope it helped you learn something new. &lt;/p&gt;

</description>
      <category>react</category>
      <category>github</category>
      <category>tutorial</category>
      <category>git</category>
    </item>
  </channel>
</rss>
