<?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: Andre Reus</title>
    <description>The latest articles on DEV Community by Andre Reus (@andrereus).</description>
    <link>https://dev.to/andrereus</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%2F435822%2Fa2cf2106-5711-42b9-906e-e64f2aae33f4.jpg</url>
      <title>DEV Community: Andre Reus</title>
      <link>https://dev.to/andrereus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andrereus"/>
    <language>en</language>
    <item>
      <title>GIT Basics Course / Cheatsheet</title>
      <dc:creator>Andre Reus</dc:creator>
      <pubDate>Wed, 16 Jun 2021 18:50:40 +0000</pubDate>
      <link>https://dev.to/andrereus/git-basics-cheatsheet-50hh</link>
      <guid>https://dev.to/andrereus/git-basics-cheatsheet-50hh</guid>
      <description>&lt;h2&gt;
  
  
  What is GIT?
&lt;/h2&gt;

&lt;p&gt;Best short and also official description:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Benefits / Comparison:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;Download and install it from &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;https://git-scm.com/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  GIT Commands
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Basic Commands
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git status // Show the current status
git init // Initialize project folder with GIT
git add // Add changes to the stage
git commit // Commit changes in the stage to the history / log
git log // Show the commit history
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  GIT Help
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git help // Help Overview
git help -a // GIT Commands
git help -g // GIT Guides
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  GIT Branching visually illustrated
&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%2F8pu5h21m48akfpolc913.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%2F8pu5h21m48akfpolc913.png" alt="GIT Branching" width="784" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Branching Commands
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch // Create a branch
git checkout (in future "git switch") // Switch to a branch
git merge // Merge a branch into an other one
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Playground for GIT Commands: &lt;a href="https://git-school.github.io/visualizing-git/" rel="noopener noreferrer"&gt;https://git-school.github.io/visualizing-git/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  GIT Client (GUI)
&lt;/h2&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%2Fw3zkin9m10zbiihkj7do.jpg" 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%2Fw3zkin9m10zbiihkj7do.jpg" alt="GIT Client" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some good free GIT Clients (GUIs) are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://git-fork.com/" rel="noopener noreferrer"&gt;https://git-fork.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sourcetreeapp.com/" rel="noopener noreferrer"&gt;https://www.sourcetreeapp.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Optional useful Diff Tool: Beyond Compare&lt;/p&gt;

&lt;h2&gt;
  
  
  Collaboration (or cloud backup)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Visually illustrated
&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%2F9izaxoz4ibechdeucxgm.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%2F9izaxoz4ibechdeucxgm.png" alt="GIT Collaboration" width="738" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Hosting services
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/" rel="noopener noreferrer"&gt;https://github.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bitbucket.org/" rel="noopener noreferrer"&gt;https://bitbucket.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://about.gitlab.com/" rel="noopener noreferrer"&gt;https://about.gitlab.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://azure.microsoft.com/" rel="noopener noreferrer"&gt;https://azure.microsoft.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Collaboration Commands
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone // Download a repository to your PC
git fetch // Download the latest content from the server
git pull // Download the latest content from the server and merge it with your local content
git push // Upload your content to the server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.github.com/en/articles/github-glossary" rel="noopener noreferrer"&gt;https://help.github.com/en/articles/github-glossary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.github.com/training-kit/" rel="noopener noreferrer"&gt;https://github.github.com/training-kit/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://rogerdudler.github.io/git-guide/" rel="noopener noreferrer"&gt;http://rogerdudler.github.io/git-guide/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.atlassian.com/git/tutorials/setting-up-a-repository" rel="noopener noreferrer"&gt;https://www.atlassian.com/git/tutorials/setting-up-a-repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://try.github.io/" rel="noopener noreferrer"&gt;https://try.github.io/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to implement Coding Guidelines</title>
      <dc:creator>Andre Reus</dc:creator>
      <pubDate>Thu, 27 Aug 2020 13:52:25 +0000</pubDate>
      <link>https://dev.to/andrereus/how-to-implement-coding-guidelines-4gl9</link>
      <guid>https://dev.to/andrereus/how-to-implement-coding-guidelines-4gl9</guid>
      <description>&lt;p&gt;Coding Guidelines are a crucial part of making a codebase with multiple contributors consistent, clean, readable and less error prone. But how do you make them easy to follow and how do you make sure they are met from every single person?&lt;/p&gt;

&lt;p&gt;The answer to that are text editor / IDE settings, formatters and linters. There are different tools for that, including the most common:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EditorConfig (Code Editor / IDE Settings)&lt;/li&gt;
&lt;li&gt;Prettier (Formatter)&lt;/li&gt;
&lt;li&gt;ESLint (JavaScript Linter)&lt;/li&gt;
&lt;li&gt;Stylelint (CSS Linter)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  EditorConfig
&lt;/h2&gt;

&lt;p&gt;EditorConfig defines a few basic settings for files in the code editor / IDE. They are applied when you create or save a file.&lt;/p&gt;

&lt;p&gt;Sample .editorconfig file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root = true

[*.{js,scss}]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In some code editors / IDEs you need to install a plugin to activate the settings. See &lt;a href="https://editorconfig.org/#download" rel="noopener noreferrer"&gt;https://editorconfig.org/#download&lt;/a&gt; for details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prettier
&lt;/h2&gt;

&lt;p&gt;Prettier is an opinionated code formatter for HTML, CSS, JavaScript, Markdown and more. It can be set up to format on save, which is very useful.&lt;/p&gt;

&lt;p&gt;Note that it is opinionated, so you can't adjust every little detail of the formatter, but the settings that are available are enough for most modern projects. See &lt;a href="https://prettier.io/docs/en/options.html" rel="noopener noreferrer"&gt;https://prettier.io/docs/en/options.html&lt;/a&gt; for details.&lt;/p&gt;

&lt;h2&gt;
  
  
  ESLint
&lt;/h2&gt;

&lt;p&gt;ESLint is an unopinionated JavaScript linter, this means that all rules can be adjusted. It checks JavaScript for code errors, but also has the option to check stylistic issues. It is a good option for large or legacy projects where every rule needs to be adjustable.&lt;/p&gt;

&lt;p&gt;During setup there are a few questions asked:&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%2Fzyil7ji8cb524vcn58i1.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%2Fzyil7ji8cb524vcn58i1.png" alt="ESLint Setup Questions" width="536" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See &lt;a href="https://eslint.org/" rel="noopener noreferrer"&gt;https://eslint.org/&lt;/a&gt; for details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stylelint
&lt;/h2&gt;

&lt;p&gt;Stylelint is an unopinionated CSS linter. Similar to ESLint all rules can be adjusted and it checks CSS for code errors, but also has the option for stylistic issues. The difference to ESLint is that it can't autofix errors.&lt;/p&gt;

&lt;p&gt;See &lt;a href="https://stylelint.io/" rel="noopener noreferrer"&gt;https://stylelint.io/&lt;/a&gt; for details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Initially you can always use an EditorConfig and then it is up to you to decide if you want a quick and "all in one" solution with a formatter like Prettier, or if you want to be able to edit every little detail of linters like ESLint and Stylelint (including linting for code errors).&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>codequality</category>
    </item>
  </channel>
</rss>
