<?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: muneebejazz</title>
    <description>The latest articles on DEV Community by muneebejazz (@muneebejaz).</description>
    <link>https://dev.to/muneebejaz</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%2F810379%2Ff0ccdea7-d422-4c5a-9584-5a3b68234c69.jpg</url>
      <title>DEV Community: muneebejazz</title>
      <link>https://dev.to/muneebejaz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muneebejaz"/>
    <language>en</language>
    <item>
      <title>Complete Guide to install mongdb driver for XAMPP PHP</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Mon, 10 Oct 2022 07:20:45 +0000</pubDate>
      <link>https://dev.to/muneebejaz/complete-guide-to-install-mongdb-driver-for-xampp-php-1c2g</link>
      <guid>https://dev.to/muneebejaz/complete-guide-to-install-mongdb-driver-for-xampp-php-1c2g</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Step 1:&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Make sure that have downloaded an install the mongodb community edition if not download it from &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.mongodb.com/try/download/community2"&gt;https://www.mongodb.com/try/download/community2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Step 2:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Download the Mongodb PHP extension file from&lt;br&gt;
&lt;a href="https://pecl.php.net/package/mongodb"&gt;https://pecl.php.net/package/mongodb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For Windows Users click the DLL button to download the Windows version of the extension&lt;br&gt;
Make sure to download the file according to your PHP version.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Step 3:&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Copy the downloaded php_mongodb.dll file to &lt;br&gt;
C:\xampp\php\ext&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Step 4:&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Add the extension in php.ini File&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;method 1:&lt;/strong&gt; open the php.ini file selected from xampp config and select php.ini&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jj8yynzi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lt7lhtmtk6o11l8v8eu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jj8yynzi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lt7lhtmtk6o11l8v8eu.png" alt="Image description" width="880" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Find extension=php_&lt;/p&gt;

&lt;p&gt;and add line &lt;br&gt;
extension=php_mongodb.dll&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;method 2:&lt;/strong&gt; open the php.ini file from C:\xampp\php\php.ini and follow the process from method 1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Step 5:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;create a testfile.php in folder C:\xampp\htdocs\&lt;/p&gt;

&lt;p&gt;and add the code &lt;/p&gt;

&lt;p&gt;&amp;lt;?php phpinfo(); ?&amp;gt;&lt;/p&gt;

&lt;p&gt;and check if the mongodb extension is installed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vUNwnO5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8xbdlymyo4xhc6bmnwt9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vUNwnO5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8xbdlymyo4xhc6bmnwt9.png" alt="Image description" width="880" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Antd Design: Table React</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Mon, 19 Sep 2022 07:17:14 +0000</pubDate>
      <link>https://dev.to/muneebejaz/antd-design-table-react-3fm0</link>
      <guid>https://dev.to/muneebejaz/antd-design-table-react-3fm0</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Useful Stackoverflow Resources&lt;br&gt;
&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/44083948/using-react-component-in-ant-design-table"&gt;https://stackoverflow.com/questions/44083948/using-react-component-in-ant-design-table&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/53778383/onmouseenter-on-a-cell-of-antd-table"&gt;https://stackoverflow.com/questions/53778383/onmouseenter-on-a-cell-of-antd-table&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/gges5110/pen/GLPjYr?editors=0010"&gt;https://codepen.io/gges5110/pen/GLPjYr?editors=0010&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>User Authentication in React using Context Api</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Mon, 11 Jul 2022 00:43:32 +0000</pubDate>
      <link>https://dev.to/muneebejaz/user-authentication-in-react-using-context-api-2cc</link>
      <guid>https://dev.to/muneebejaz/user-authentication-in-react-using-context-api-2cc</guid>
      <description>&lt;p&gt;How to upload files in node.js using multer.&lt;/p&gt;

</description>
      <category>react</category>
    </item>
    <item>
      <title>Understanding useEffect() lifeCycle hook in React with Examples</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Thu, 23 Jun 2022 19:41:00 +0000</pubDate>
      <link>https://dev.to/muneebejaz/understanding-useeffect-lifecycle-hook-in-react-with-examples-47g3</link>
      <guid>https://dev.to/muneebejaz/understanding-useeffect-lifecycle-hook-in-react-with-examples-47g3</guid>
      <description>&lt;p&gt;useEffect hook corresponds to componentDidMount and componentDidUpdate depending on what we pass to the dependency array as the second parameter of useEffect method&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Empty dependency Array useEffect(()=&amp;gt; {}, &lt;strong&gt;[]&lt;/strong&gt;)&lt;br&gt;
The useEffect() will run once only for the lifecycle of the &lt;br&gt;
component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Example 1
&lt;/h4&gt;

&lt;p&gt;Lets say we want to toggle (focus &amp;amp;&amp;amp; display) input element whenever we press a button.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState, useRef, useEffect } from "react";

const Test3 = () =&amp;gt; {
  const [isEditing, setIsEditing] = useState(false);
  const textInputRef = useRef(null);
  useEffect(() =&amp;gt; {
    console.log("useEffect Called.");
    if (isEditing &amp;amp;&amp;amp; textInputRef.current) {
      textInputRef.current.focus();
    }
  }, [isEditing, textInputRef]);
  return (
    &amp;lt;div className="m-12 flex gap-2"&amp;gt;
      &amp;lt;input
        ref={textInputRef}
        type="text"
        className={`border border-gray-400 px-3 py-1.5 rounded `}
        placeholder="Search"
        disabled={!isEditing}
      /&amp;gt;

      &amp;lt;button
        className="bg-blue-500 text-white px-5 rounded"
        onClick={() =&amp;gt; {
          setIsEditing((prev) =&amp;gt; !prev);
        }}&amp;gt;
        Toggle Focus
      &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default Test3;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>react</category>
      <category>hooks</category>
      <category>useeffect</category>
      <category>javascript</category>
    </item>
    <item>
      <title>react component dropdown &amp; detect click outside react component</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Tue, 21 Jun 2022 20:27:55 +0000</pubDate>
      <link>https://dev.to/muneebejaz/react-component-dropdown-detect-click-outside-react-component-709</link>
      <guid>https://dev.to/muneebejaz/react-component-dropdown-detect-click-outside-react-component-709</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useRef, useEffect, useState } from "react";

const Test = () =&amp;gt; {
  const divRef = useRef();
  const [isOpen, setIsOpen] = useState(false);

  useEffect(() =&amp;gt; {
    function handleDocumentClick(e) {
      if (
        divRef.current &amp;amp;&amp;amp;
        !divRef.current.contains(e.target) &amp;amp;&amp;amp;
        divRef.current !== e.target
      ) {
        setIsOpen(false);
      }
    }

    document.addEventListener("click", handleDocumentClick);

    return () =&amp;gt; {
      document.removeEventListener("click", handleDocumentClick);
    };
  }, []);

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;button
        className="px-5 py-2 border border-gray-400 rounded"
        onClick={(e) =&amp;gt; {
          e.stopPropagation();
          setIsOpen((prev) =&amp;gt; !prev);
        }}&amp;gt;
        English
      &amp;lt;/button&amp;gt;
      {isOpen &amp;amp;&amp;amp; (
        &amp;lt;div
          ref={divRef}
          className="px-5 py-2 rounded border border-gray-400 rounded flex flex-col gap-3 inline-flex"&amp;gt;
          &amp;lt;div&amp;gt;
            Lorem ipsum dolor sit amet consectetur adipisicing elit. Quibusdam
            aut voluptatem reiciendis modi sapiente deleniti quaerat repellat,
            provident ea quas nemo voluptatum cupiditate perferendis iusto earum
            molestiae molestias ratione veniam.
          &amp;lt;/div&amp;gt;
          &amp;lt;button&amp;gt;Arabic&amp;lt;/button&amp;gt;
          &amp;lt;button&amp;gt;German&amp;lt;/button&amp;gt;
        &amp;lt;/div&amp;gt;
      )}
    &amp;lt;/div&amp;gt;
  );
};

export default Test;

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

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>React Native</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Fri, 13 May 2022 22:21:26 +0000</pubDate>
      <link>https://dev.to/muneebejaz/react-native-18je</link>
      <guid>https://dev.to/muneebejaz/react-native-18je</guid>
      <description>&lt;h2&gt;
  
  
  React Navigation v6.x
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Install in Expo Project
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @react-navigation/native
expo install react-native-screens react-native-safe-area-context
expo install @react-navigation/native-stack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. Wrap your App.js with NavigationContainer component.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;NavigationContainer&amp;gt;
   // you app code goes here
&amp;lt;/NavigationContainer&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. React Native Stack Navigator
&lt;/h4&gt;

&lt;p&gt;Create Native Stack Navigator &lt;/p&gt;

&lt;p&gt;const Stack = createNativeStackNavigator()&lt;/p&gt;



</description>
    </item>
    <item>
      <title>React Portals</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Fri, 22 Apr 2022 16:55:15 +0000</pubDate>
      <link>https://dev.to/muneebejaz/react-portals-4o30</link>
      <guid>https://dev.to/muneebejaz/react-portals-4o30</guid>
      <description>&lt;p&gt;Raact portals provide a way to render children into a DOM node that exists parent DOM hierarchy.&lt;/p&gt;

&lt;p&gt;In react app the div with id root is the entry point, and all the DOM elements exits under root element.&lt;/p&gt;

&lt;p&gt;React Portal provide ability to break out of this root and exists anywhere outside the scope of root div.&lt;/p&gt;

&lt;p&gt;we will use ReactDom.createPortal(component, element)&lt;/p&gt;

&lt;p&gt;we can create a PortalDemo functional component&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'
import ReactDom from 'react-dom'
export Default function PortalDemo(){
   return ReactDom.createPortal(
       &amp;lt;h1&amp;gt;Portals Demo&amp;lt;/h1&amp;gt;,
       document.getElementById('portal-root')
   )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>react</category>
      <category>javascript</category>
      <category>portal</category>
    </item>
    <item>
      <title>Create beautiful gradient text in CSS with three lines of code!</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Mon, 18 Apr 2022 09:29:13 +0000</pubDate>
      <link>https://dev.to/muneebejaz/create-beautiful-gradient-text-in-css-with-three-lines-of-code-2e67</link>
      <guid>https://dev.to/muneebejaz/create-beautiful-gradient-text-in-css-with-three-lines-of-code-2e67</guid>
      <description>&lt;p&gt;In this post I will walk you through about creating gradient text in css. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ue9vtP5v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/96twuk5esc2n51w2oipq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ue9vtP5v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/96twuk5esc2n51w2oipq.png" alt="Image description" width="623" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can easily add gradient to your text by adding two properties in css to the element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1 {
background: linear-gradient(to right, #93fd33 0%,#1A9DF4 100%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-webkit-background-clip:text , and -webkit-text-fill-color:transparent properties are must to add graident to your text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Full Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8"&amp;gt;
    &amp;lt;title&amp;gt;Text Gradient&amp;lt;/title&amp;gt;
    &amp;lt;meta name="description" content="How to make gradient text."&amp;gt;
    &amp;lt;style&amp;gt;
         body {
    background-color:black;
        }
.text1 {
    font-family:'Poppins';
    font-size:192px;
    margin:100px;
    background: linear-gradient(to right, #93fd33 0%,#1A9DF4 100%);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}


    &amp;lt;/style&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1 class="text1"&amp;gt;Hello&amp;lt;/h1&amp;gt;    
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;



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

&lt;/div&gt;



</description>
      <category>html</category>
      <category>css</category>
      <category>uiweekly</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Best Fonts families to visit</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Tue, 12 Apr 2022 08:19:16 +0000</pubDate>
      <link>https://dev.to/muneebejaz/best-fonts-families-to-visit-1gci</link>
      <guid>https://dev.to/muneebejaz/best-fonts-families-to-visit-1gci</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Lato&lt;/li&gt;
&lt;li&gt;Montserrat&lt;/li&gt;
&lt;li&gt;Roboto&lt;/li&gt;
&lt;li&gt;Poppins&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>design</category>
    </item>
    <item>
      <title>How can I create low highlight under text or custom underline in html or css?</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Mon, 11 Apr 2022 09:21:47 +0000</pubDate>
      <link>https://dev.to/muneebejaz/how-can-i-create-low-highlight-under-text-or-custom-underline-in-html-or-css-101</link>
      <guid>https://dev.to/muneebejaz/how-can-i-create-low-highlight-under-text-or-custom-underline-in-html-or-css-101</guid>
      <description>&lt;p&gt;In this small tutorial I will guide you how you can achieve the following low highlight effect or beautiful bold under line under your text.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fivshouenkbpw3l7nq2r0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fivshouenkbpw3l7nq2r0.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Achieve it?
&lt;/h2&gt;

&lt;p&gt;create a paragraph tag and inside it enclose the text you want to high within span tag with the class name you like.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTML
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p class="hero-title"&amp;gt;You can easily &amp;lt;span class="half-highlight-yellow-2"&amp;gt;do underline&amp;lt;/span&amp;gt; me.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.half-highlight-yellow-2 {
  background:linear-gradient(180deg, transparent 60%, yellow 60%);
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;u&gt;check it live on codepen&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://codepen.io/muneebejazio/pen/QWaxeBY" rel="noopener noreferrer"&gt;https://codepen.io/muneebejazio/pen/QWaxeBY&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Github commands Cheatsheet</title>
      <dc:creator>muneebejazz</dc:creator>
      <pubDate>Sun, 06 Feb 2022 19:51:14 +0000</pubDate>
      <link>https://dev.to/muneebejaz/github-commands-cheatsheet-455o</link>
      <guid>https://dev.to/muneebejaz/github-commands-cheatsheet-455o</guid>
      <description>&lt;p&gt;//check if git is installed in the system&lt;br&gt;
git --version&lt;/p&gt;

&lt;p&gt;//set your name&lt;br&gt;
git config --global user.name "John Doe"&lt;/p&gt;

&lt;p&gt;//set your email id&lt;br&gt;
git config --global user.email "&lt;a href="mailto:example@gmil.com"&gt;example@gmil.com&lt;/a&gt;"&lt;/p&gt;

&lt;p&gt;//edit the whole config file&lt;br&gt;
git config --global --edit&lt;/p&gt;

&lt;p&gt;//Initialize git repository&lt;br&gt;
git init&lt;/p&gt;

&lt;p&gt;//get the status of the files tracked by git&lt;br&gt;
git status&lt;/p&gt;

&lt;p&gt;//to track a file by git use (git add) command and then name of the file or folder to track&lt;br&gt;
git add example_filename.py&lt;/p&gt;

&lt;p&gt;// to track all the files use dot .&lt;br&gt;
git add .&lt;/p&gt;

&lt;p&gt;//to commit changes use (git commit) with -m flag for message for the commit&lt;br&gt;
git commit -m "example_message"&lt;/p&gt;

&lt;p&gt;//to see all of the commits git log command is used&lt;br&gt;
git log&lt;/p&gt;

&lt;p&gt;//to move between the commit changes use git checkout command&lt;br&gt;
git checkout "hash_code_of_the_commit"&lt;/p&gt;

&lt;p&gt;//to move the head to master &lt;br&gt;
git checkout master&lt;/p&gt;

&lt;p&gt;//to make a new branch&lt;br&gt;
git branch example_branch_name&lt;/p&gt;

&lt;p&gt;//to move to branch use checkout command&lt;br&gt;
git checkout example_branch_name&lt;/p&gt;

&lt;p&gt;//to create and move to the newly created branch use flag -b&lt;br&gt;
git checkout -b branch_name&lt;/p&gt;

&lt;p&gt;//to get the origin of the remote&lt;br&gt;
git remote -v&lt;/p&gt;

&lt;p&gt;//to set the origin of the remote repository &lt;br&gt;
git remote add origin "&lt;a href="https://github.com/example_repository"&gt;https://github.com/example_repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;//renames the main branch to master&lt;br&gt;
git branch -M master&lt;/p&gt;

&lt;p&gt;//push the code into your repository on the github, or gitlab&lt;br&gt;
git push -u origin master&lt;/p&gt;

&lt;p&gt;//clone a repository from github, gitlab url&lt;br&gt;
git clone "&lt;a href="https://github.com/repo_url"&gt;https://github.com/repo_url&lt;/a&gt;"&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Common Github Errors
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
If you accidently include node_modules folder &lt;br&gt;
then you need to remove it from the cache in order to get rid of node_modules resided in your github repo&lt;/p&gt;

&lt;p&gt;git rm -r --cached node_modules&lt;/p&gt;

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