<?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: Dev</title>
    <description>The latest articles on DEV Community by Dev (@devmittal04).</description>
    <link>https://dev.to/devmittal04</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%2F575375%2F529dacbe-ee68-4077-b015-8c0e9f79ae6a.jpg</url>
      <title>DEV Community: Dev</title>
      <link>https://dev.to/devmittal04</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devmittal04"/>
    <language>en</language>
    <item>
      <title>Basics of Creating a Chrome Extension</title>
      <dc:creator>Dev</dc:creator>
      <pubDate>Wed, 26 May 2021 13:17:55 +0000</pubDate>
      <link>https://dev.to/devmittal04/basics-of-creating-a-chrome-extension-4da8</link>
      <guid>https://dev.to/devmittal04/basics-of-creating-a-chrome-extension-4da8</guid>
      <description>&lt;p&gt;In this blog, we will learn the basics of creating a Chrome extension. In the process, we will create a very basic chrome extension - a word enhancing application. In this extension, we will be enhancing the word "Rainbow" and put a rainbow icon after the word and put a basic animation on the text.&lt;/p&gt;

&lt;p&gt;So let's begin!&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;For creating a Chrome extension, the workspace setup is really simeple. You just need 2 things: a text editor(like VS code, sublime text etc.) and a browser(we will be using Google Chrome).&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Creating a Manifest file
&lt;/h2&gt;

&lt;p&gt;Manifest file is the most important one for creating a Chrome extension as it contains the meta data of the extension. It defines information like name, description, icons, version and other important details of the extension. &lt;/p&gt;

&lt;p&gt;Thus every chrome extension consists of a manifest.json file.&lt;br&gt;
Below is the manifest.json file for our word enhancing application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "manifest_version": 2,
    "name": "Rainbow Glory",
    "version": "0.1.0",
    "description": "This extension glorifies the word 'Rainbow'",
    "content_scripts": [
        {
            "matches": ["&amp;lt;all_urls&amp;gt;"],
            "js": ["script.js"],
            "css": ["styles.css"] 
        }
    ],
    "icons": {
        "128": "images/rainbow128.png",
        "48": "images/rainbow48.png" 
    },
    "browser_action": {
        "default_icon": "images/rainbow48.png"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are some things defined in the above code. Let's take a closer look on each of them:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a) &lt;em&gt;manifest_version&lt;/em&gt;:&lt;/strong&gt; It defines the version of manifest file your package requires. The latest version currently is '3' but in this example we will be using version '2'.&lt;br&gt;
&lt;strong&gt;b) &lt;em&gt;name&lt;/em&gt;:&lt;/strong&gt; This is the name of your Chrome Extension.&lt;br&gt;
&lt;strong&gt;c) &lt;em&gt;version&lt;/em&gt;:&lt;/strong&gt; This is the version of the Chrome Extension that we are developing.&lt;br&gt;
&lt;strong&gt;d) &lt;em&gt;description&lt;/em&gt;:&lt;/strong&gt; This is the text that will be visible about the Chrome Extension.&lt;br&gt;
&lt;strong&gt;e) &lt;em&gt;content_scripts&lt;/em&gt;:&lt;/strong&gt; These are files that run in context of web pages. This means that they are able to read details of the web pages and make changes to them.&lt;br&gt;
&lt;strong&gt;f) &lt;em&gt;icons&lt;/em&gt;:&lt;/strong&gt; These are the icons that represent our app. The 128x128 icon is used during installation and is visible on the Chrome Web Store and the 48x48 icon is visible on the extensions management page(chrome://extensions).&lt;br&gt;
&lt;strong&gt;g) &lt;em&gt;browser_action&lt;/em&gt;:&lt;/strong&gt; This is used to put icon on the Google Chrome Toolbar. In addition, we can also put tooltip, a badge and a popup.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Code Logic
&lt;/h2&gt;

&lt;p&gt;Now that our manifest.json file is created, let's start building our code logic. We have defined &lt;strong&gt;&lt;em&gt;'script.js'&lt;/em&gt;&lt;/strong&gt; as our &lt;em&gt;'js'&lt;/em&gt; file in the &lt;em&gt;'content_script'&lt;/em&gt; in the &lt;em&gt;'manifest.json'&lt;/em&gt;. So we'll put our code for doing DOM manipulation here.&lt;/p&gt;

&lt;p&gt;We want to enhance each and every occurance of the word 'Rainbow' and put a rainbow icon along with some animations. For this, first we need to identify each and every occurance of the word 'Rainbow'.&lt;/p&gt;

&lt;p&gt;We will run a recursive function to reach to the nth level of child in the DOM and use regex to search for the pattern of the word(case insensitive). After that, we will create a new element with the respective word, put a rainbow icon (🌈) just after it and give a class to that element for applying animations on it. The whole function will be called at the load time of the web page itself.&lt;/p&gt;

&lt;p&gt;Given below is the code for the &lt;strong&gt;&lt;em&gt;'script.js'&lt;/em&gt;&lt;/strong&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;replaceText(document.body);

function replaceText(element) {
    if (element.hasChildNodes()) {
        element.childNodes.forEach(replaceText);
    } else if (element.nodeType === Text.TEXT_NODE) {
        if (element.textContent.match(/rainbow/gi)){
            const newElement = document.createElement('span')
            newElement.innerHTML = element.textContent.replace(/(rainbow)/gi, '&amp;lt;span class="rainbow"&amp;gt;$1 🌈&amp;lt;/span&amp;gt;')
            element.replaceWith(newElement);
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;replaceText&lt;/em&gt; is the recursive function which is using DOM to search for the nth child and then through regex, we are searching for each and every occurance of the word 'Rainbow'. Whenever we find a match we create a new element(here we are creating a &lt;span&gt; element) and then replace the word with the &lt;span&gt; element with class &lt;em&gt;'rainbow'&lt;/em&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. CSS (for Animation)
&lt;/h2&gt;

&lt;p&gt;Now it's time to add some css to apply animation on the replaced element.&lt;/p&gt;

&lt;p&gt;We will add an animation loop of 800ms which will run for infinite times and in keyframes we will change the text color to all the colors of the rainbow during each iteration of the loop.&lt;/p&gt;

&lt;p&gt;Given below is the code in &lt;strong&gt;&lt;em&gt;styles.css&lt;/em&gt;&lt;/strong&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.rainbow {
    animation: rainbow 800ms;
    animation-iteration-count: infinite;
}

@keyframes rainbow {
    0% {
        color: red;
    }

    15% {
        color: orange;
    }
    30% {
        color: yellow;
    }
    45% {
        color: green;
    }
    60% {
        color: blue;
    }
    75% {
        color : indigo;
    }
    90% {
        color: purple;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Directory tree
&lt;/h2&gt;

&lt;p&gt;The whole project directory consists of these files: &lt;em&gt;manifest.json, scripts.js, styles.css, images folder with rainbow48.png &amp;amp; rainbow128.png&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Given below is the final Directory tree that we have now:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Az6DDCC---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a477t45warctnaal1ldb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Az6DDCC---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a477t45warctnaal1ldb.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In case there were any difficulties with the code, go to this &lt;a href="https://github.com/DevMittal04/word-enhancer-chrome-extension"&gt;repository&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Using extension
&lt;/h2&gt;

&lt;p&gt;To use the chrome extension, we can either host the extension on the Chrome Web Store or locally upload the extension in extensions management page(chrome://extensions).&lt;/p&gt;

&lt;p&gt;To host your extension, follow the &lt;a href="https://chrome.google.com/webstore/devconsole/"&gt;Chrome Web Store Developer Dashboard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To upload the extension locally, follow the given steps:&lt;br&gt;
&lt;strong&gt;a)&lt;/strong&gt; Go to extensions management page(chrome://extensions).&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u9lrMrNB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m894mmf5d3fnc44yu4xt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u9lrMrNB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m894mmf5d3fnc44yu4xt.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Enable the &lt;strong&gt;&lt;em&gt;Developer Mode&lt;/em&gt;&lt;/strong&gt; on the page. This will provide additional options for the &lt;strong&gt;&lt;em&gt;Chrome Extension Developer&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer Mode:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fjveh6ei--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gq4eu6bvz0je1sjltgjc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fjveh6ei--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gq4eu6bvz0je1sjltgjc.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer Options:&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V8rzIp5a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r85rdamkglxfme79m8bl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V8rzIp5a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r85rdamkglxfme79m8bl.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt; Click on &lt;strong&gt;&lt;em&gt;Load unpacked&lt;/em&gt;&lt;/strong&gt; button in the &lt;strong&gt;Developer Option&lt;/strong&gt; mentioned above. Now navigate to the project folder that you have created and select it. The extension will be added in the extensions management page(chrome://extensions).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OvUqhz3v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vz8e2miw841fy70a05m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OvUqhz3v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vz8e2miw841fy70a05m.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can enable it, and go to a web page with the word &lt;a href="https://en.wikipedia.org/wiki/Rainbow"&gt;"Rainbow"&lt;/a&gt; and enjoy the magnificent extension.&lt;/p&gt;

&lt;p&gt;For advance concepts, checkout the official &lt;a href="https://developer.chrome.com/docs/extensions/"&gt;Chrome Extensions Developer Documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's an end to this guide of Basics of Creating a Chrome Extension. Have fun exploring more.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>css</category>
      <category>extension</category>
    </item>
    <item>
      <title>Getting started with Git (on windows)</title>
      <dc:creator>Dev</dc:creator>
      <pubDate>Tue, 25 May 2021 14:04:56 +0000</pubDate>
      <link>https://dev.to/devmittal04/getting-started-with-git-on-windows-3flh</link>
      <guid>https://dev.to/devmittal04/getting-started-with-git-on-windows-3flh</guid>
      <description>&lt;p&gt;In this blog, we will get to know how to get started with Git.&lt;br&gt;
So before we begin, first we need to know what exactly is 'Git'.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git&lt;/strong&gt; is a &lt;em&gt;version control system&lt;/em&gt; which is used to maintain project journey and push and get the updates to and from an online repository.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Version Control System&lt;/strong&gt; is a software used to keep track of the changes made in a software by maintaining its multiple versions which can be referred to and retrieved as and when required. This helps the developers in a team to coordinate with each other easily.&lt;/p&gt;

&lt;p&gt;Now we have got an idea about Git. So let's begin learning Git:&lt;/p&gt;
&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;To work with git on windows, we need to install &lt;a href="https://git-scm.com/download/win"&gt;&lt;strong&gt;Git Bash&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Setting up SSH Keys
&lt;/h2&gt;

&lt;p&gt;While working with Git, there are two types of repositories that we can encounter: local repository and remote repository.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;local repository&lt;/strong&gt; is a folder in our system where all the files related to the project are stored. This repository is present in our local systems and is thus not accessible globally.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;remote repository&lt;/strong&gt; is the one that exists on the internet on platforms like &lt;a href="https://github.com"&gt;GitHub&lt;/a&gt;, &lt;a href="https://bitbucket.org/"&gt;Bitbucket&lt;/a&gt; and &lt;a href="https://gitlab.com"&gt;GitLab&lt;/a&gt; which can be accessed globally. &lt;em&gt;GitHub&lt;/em&gt; is the most popular of all with a large number of repositories related to open source applications. In this blog, we will be using setting up our remote repository on GitHub.&lt;/p&gt;

&lt;p&gt;For accessing the remote repository, we need to authenticate ourselves as the rightful user/collaborator of the repository and for that we need to enter our credentials of the remote repository account everytime we need to perform a task. So to make authentication process untidious, we setup SSH Keys.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SSH Keys&lt;/strong&gt; created a connection between systems and thus we are able to communicate with remote systems easily.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To set up an SSH Key:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;i)&lt;/strong&gt; Go to the Command Prompt and type the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ii)&lt;/strong&gt; Select the location where you want to store your SSH keys.&lt;br&gt;
&lt;strong&gt;iii)&lt;/strong&gt; Enter the passphrase characters. Passphrase characters are used to encrypt the text in a more secured way. For the ease of usage, we can skip this by simply pressing the "Enter" key. After this your SSH key will be generated.&lt;br&gt;
&lt;strong&gt;iv)&lt;/strong&gt; In the location where you have stored the SSH Key, find the file with &lt;em&gt;.pub&lt;/em&gt; extension(this file contains your public key). Copy the contents of this file.&lt;br&gt;
&lt;strong&gt;v)&lt;/strong&gt; Go to the settings of your repository provider and then search for the label 'SSH' and generate a new SSH Key.&lt;br&gt;
&lt;strong&gt;vi)&lt;/strong&gt; Paste the contents of the file here and you can also name it to remember the system for which the key have been generated.&lt;/p&gt;

&lt;p&gt;Now you have established a connection between your system and the remote repository account.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Setting up Global User and Email
&lt;/h2&gt;

&lt;p&gt;While working with remote repositories, we need to mention the identity of the user who has performed a certain commit('commit' is explained in the coming text). For that, we need to set up global user and email.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To set up global user and email&lt;/strong&gt;, enter the following commands in your git bash:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;[Note: The things enclosed in &amp;lt;&amp;gt; are to be replaced with the actual content]&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name &amp;lt;user_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For email:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.email &amp;lt;user_email&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is preferred to use the email with your repository account.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Creating a new remote repository
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;To create a new remote repository:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;i)&lt;/strong&gt; Open your web browser and navigate to repository provider website of your choice and create account(if you don't have already).&lt;br&gt;
&lt;strong&gt;ii)&lt;/strong&gt; Find and click on the 'New repository' button. Enter the details such as name of the repository, public/private access etc.&lt;br&gt;
&lt;strong&gt;iii)&lt;/strong&gt; Click on the create repository button. Your remote repository has been created.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Creating a local repository
&lt;/h2&gt;

&lt;p&gt;We can create a git repository in two ways:&lt;/p&gt;
&lt;h4&gt;
  
  
  A) Initialising locally:
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;i)&lt;/strong&gt; Go to the folder which you want to initialise as your git repository&lt;br&gt;
&lt;strong&gt;ii)&lt;/strong&gt; Inside the folder, open git bash and enter the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your folder as been initialised as a local git repository. A &lt;em&gt;.git&lt;/em&gt; folder has been created in your working directory/folder(enable "Hidden items" settings from "View" if not visible).&lt;br&gt;
&lt;strong&gt;iii)&lt;/strong&gt; Now open your browser and navigate to the remote repository(create one if you don't have already) and click "Code".&lt;br&gt;
&lt;strong&gt;iv)&lt;/strong&gt; Under "HTTPS", copy the url using the clipboard button.&lt;br&gt;
&lt;strong&gt;v)&lt;/strong&gt; Go to git bash and paste it after the "git remote" command as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add origin &amp;lt;remote_repository_url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The local repository is now connected with the remote repository.&lt;/p&gt;

&lt;h4&gt;
  
  
  B) Cloning an existing remote repository:
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;i)&lt;/strong&gt; Open your web browser and navigate to the repository you want to clone.&lt;br&gt;
&lt;strong&gt;ii)&lt;/strong&gt; Click "Code" and under "HTTPS", copy the url using the clipboard button.&lt;br&gt;
&lt;strong&gt;iii)&lt;/strong&gt; Go to git bash and paste it after the "git clone" command as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone &amp;lt;remote_repository_url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have successfully cloned the repository and the local repository is connected with the remote repository.&lt;/p&gt;

&lt;p&gt;Now we can proceed with adding our files in our repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Staging and Unstaging Files
&lt;/h2&gt;

&lt;p&gt;Once we have added our files to the local repository, it's time we add them to the remote repository as well.&lt;/p&gt;

&lt;p&gt;To do so, we have to first mention that we are ready to send the updates in our local repository to the remote repository. For this, we stage our changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To stage the changes in your local repository&lt;/strong&gt;, put the following commands in git bash:&lt;/p&gt;

&lt;h4&gt;
  
  
  A) For selective files:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  B)For all the files:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now there may come situations when you want to remove some files from the staging area. In that situation we unstage the respective files by the following commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset HEAD &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git restore --stagged &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Commiting Files
&lt;/h2&gt;

&lt;p&gt;Once we have stagged the files i.e. we have set the files we are ready to push to the remote repository, we commit them to save the changes in the local repository. This ensures that the changes to the file/folders have been recorded up to a certain extent/timeline. Make sure to add a meaningful message in the commit as it helps to review the code in the future instances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To commit the changes:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m &amp;lt;commit_message&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Selecting the branch
&lt;/h2&gt;

&lt;p&gt;Now our changes have been committed. It is time for us to select our branch to which we will be pushing the changes in our repository.&lt;/p&gt;

&lt;p&gt;In GitHub, the name of the default branch was changed from 'master' to 'main' recently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To select the branch&lt;/strong&gt;, we do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -M &amp;lt;branch_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In default situations we put branch name as 'main'. Branch selection is required only in the first commit or in case we switch between branches.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Pushing the code
&lt;/h2&gt;

&lt;p&gt;Now we are ready to push our changes into the remote repository. This action reflect all the changes that we have committed in the remote repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To push the work:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin &amp;lt;branch_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default, we put 'main' as our branch. In case we want to push the code to some other branch, then we mention that branch's name here.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Logs
&lt;/h2&gt;

&lt;p&gt;We can view the logs of our commits on both the local repository and remote repository on their respective platforms. See the logs, we can determine which repository is ahead of the other.&lt;/p&gt;

&lt;h4&gt;
  
  
  A) To view the commit logs of the local repository:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  B) To view the commit logs of the remote repository:
&lt;/h4&gt;

&lt;p&gt;i) Open you web browser and navigate to your remote repository.&lt;br&gt;
ii) Below the 'Code' button, there will be a label showing the number of commits made to the repository. Click on that label.&lt;br&gt;
iii) You will be navigated to the page with list of commits made to the repository.&lt;/p&gt;

&lt;p&gt;For advance concepts, checkout the &lt;a href="https://git-scm.com/doc"&gt;&lt;strong&gt;Git Official Documentation&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also there are some advance workflows which make working on Git extremely easy for big projects and team. Check them out &lt;a href="https://www.atlassian.com/git/tutorials/comparing-workflows"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That's an end to this guide of Starting with Git on Windows. Have fun exploring more.&lt;/p&gt;

</description>
      <category>git</category>
      <category>gitflow</category>
    </item>
    <item>
      <title>Basics of Markdown </title>
      <dc:creator>Dev</dc:creator>
      <pubDate>Sun, 21 Mar 2021 17:39:10 +0000</pubDate>
      <link>https://dev.to/devmittal04/markdown-pointers-30of</link>
      <guid>https://dev.to/devmittal04/markdown-pointers-30of</guid>
      <description>&lt;p&gt;In this blog, we will learn Markdown.&lt;/p&gt;

&lt;p&gt;**Markdown is a lightweight markup language used for creating simple formatted text. This language can be used to give basic but effective design for websites, description of repositories in platforms like GitHub, Bitbucket etc and also write blogs on some platforms like dev.to&lt;/p&gt;

&lt;p&gt;So now let's explore Markdown!&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Syntax
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Headings
&lt;/h3&gt;

&lt;p&gt;Use hashes ' # ' to define Headings.&lt;/p&gt;

&lt;h1&gt;
  
  
  H1
&lt;/h1&gt;

&lt;h2&gt;
  
  
  H2
&lt;/h2&gt;

&lt;h3&gt;
  
  
  H3
&lt;/h3&gt;

&lt;h4&gt;
  
  
  H4
&lt;/h4&gt;

&lt;h5&gt;
  
  
  H5
&lt;/h5&gt;

&lt;p&gt;No. of hashes define the heading sizes in Markdown. A single hash (#) means H1 and five hashes means H5.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bold, Italics and Strikethrough
&lt;/h3&gt;

&lt;p&gt;Enclose text between ' ** ' or ' __ ' for making text &lt;strong&gt;Bold&lt;/strong&gt;&lt;br&gt;
Enclose text between ' * ' or ' _ ' for making text &lt;em&gt;Italics&lt;/em&gt;.&lt;br&gt;
Enclose text between ' ~~ ' for &lt;del&gt;Strikethrough&lt;/del&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Blockquotes
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Put ' &amp;gt; ' before your text to display it as a Blockquote.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Lists
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use numbers followed by a dot (ex: 1.) to make an ordered list. Putting the wrong number values doesn't hamper the correctiveness of the list.&lt;/li&gt;
&lt;li&gt;Use dash (-), asterisk (*) or plus (+) symbol to make unordered list.&lt;/li&gt;
&lt;li&gt;Use indentation  with the list symbols to create sub-items in the list.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Code Blocks
&lt;/h3&gt;

&lt;p&gt;Enclose the code between pairs of 3 continuous back quotes (`) to make it a code block. This takes the indentations into account as it creates a 'pre' tag around the code. Also put the code around braces '{}' to give it a look of a code block. To mention the code language, we can also mention it after the first 3 continuous back quotes. For example:&lt;/p&gt;

&lt;pre&gt;
  '''
     {
        This is a code statement.
     }
  '''
&lt;/pre&gt;

&lt;p&gt;Alternatively we can also enclose the code inside the braces '{}' only to form a code block put this method does not keep indentation into account, thus is not recommended.&lt;/p&gt;

&lt;h3&gt;
  
  
  Images
&lt;/h3&gt;

&lt;p&gt;Images can be embeded using the following syntax.&lt;/p&gt;

&lt;pre&gt;
  ![Alt Text](Image URL "Title Text")
&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UKXo5saF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/rTZkf4K.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UKXo5saF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/rTZkf4K.gif" alt="Jim Carrey Typing Gif" title="Me when I have mastered Markdown"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Links and Emails
&lt;/h3&gt;

&lt;p&gt;Links and Emails can be embeded using the following syntax.&lt;/p&gt;

&lt;pre&gt;
Links:
[Display Text](Link URL "Title Text")

Emails:
1. Put email address inside &amp;lt;&amp;gt;
2. [Display Text](mailto:email_address "Title Text")
&lt;/pre&gt;

&lt;p&gt;This is my &lt;a href="https://github.com/DevMittal04"&gt;GitHub Profile&lt;/a&gt;.&lt;br&gt;
You can contact me at &lt;a href="mailto:devmittal0407@gmail.com"&gt;devmittal0407@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Extended Syntax
&lt;/h2&gt;

&lt;p&gt;Extended Syntax is the set of advance concepts of Markdown library. &lt;br&gt;
NOTE: Currently dev.to doesn't support Extended syntax so you may not be able to get the correct output, but feel free to try this on other platforms that supports extended syntax like GitHub etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tables
&lt;/h3&gt;

&lt;p&gt;We can create table under Extended Syntax using the following:&lt;/p&gt;

&lt;pre&gt;
| Left | Centre | Right |
|:-----|:------:|------:|
|1     |2       |3      |
&lt;/pre&gt;

&lt;h4&gt;
  
  
  Output
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Left&lt;/th&gt;
&lt;th&gt;Centre&lt;/th&gt;
&lt;th&gt;Right&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Colons(:) are used to define the alignment of the next cell. On the above output, headings denote which alignment the colons will apply.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task Lists
&lt;/h3&gt;

&lt;p&gt;Task lists are checkbox based lists.&lt;/p&gt;

&lt;pre&gt;
[ ] Unchecked Item
[x] Checked Item
&lt;/pre&gt;

&lt;p&gt;That's an end to this guide of Markdown. Have fun exploring more.&lt;/p&gt;

</description>
      <category>markdown</category>
      <category>github</category>
    </item>
  </channel>
</rss>
