<?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: Pranav Kumar</title>
    <description>The latest articles on DEV Community by Pranav Kumar (@pranavkumar389).</description>
    <link>https://dev.to/pranavkumar389</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%2F67296%2Fda907dc3-a117-4dd2-b912-0d4babff7975.png</url>
      <title>DEV Community: Pranav Kumar</title>
      <link>https://dev.to/pranavkumar389</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pranavkumar389"/>
    <language>en</language>
    <item>
      <title>JavaScript resources you must bookmark.</title>
      <dc:creator>Pranav Kumar</dc:creator>
      <pubDate>Wed, 26 May 2021 15:44:29 +0000</pubDate>
      <link>https://dev.to/pranavkumar389/javascript-resources-you-must-bookmark-4j3d</link>
      <guid>https://dev.to/pranavkumar389/javascript-resources-you-must-bookmark-4j3d</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;JavaScript runtime visualizer&lt;br&gt;
&lt;a href="https://www.jsv9000.app/"&gt;https://www.jsv9000.app/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Interactive JavaScript Tutorial&lt;br&gt;
&lt;a href="https://www.learn-js.org/en/"&gt;https://www.learn-js.org/en/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript Tutorial&lt;br&gt;
&lt;a href="https://www.javascripttutorial.net/"&gt;https://www.javascripttutorial.net/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A Modern JavaScript Tutorial&lt;br&gt;
&lt;a href="https://javascript.info/"&gt;https://javascript.info/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript Algorithm - 30 seconds of code&lt;br&gt;
&lt;a href="https://www.30secondsofcode.org/js/p/1"&gt;https://www.30secondsofcode.org/js/p/1&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build 30 things with vanilla JS in 30 days&lt;br&gt;
&lt;a href="https://javascript30.com/"&gt;https://javascript30.com/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript - The Right Way&lt;br&gt;
&lt;a href="https://jstherightway.org/"&gt;https://jstherightway.org/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Free JavaScript Resources&lt;br&gt;
&lt;a href="https://www.java5cript.com/"&gt;https://www.java5cript.com/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Tip:- Pick one resource at a time. Enjoy the great contents.&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>git learn --mode=fast</title>
      <dc:creator>Pranav Kumar</dc:creator>
      <pubDate>Sun, 15 Apr 2018 16:54:40 +0000</pubDate>
      <link>https://dev.to/pranavkumar389/git-learn---modefast-2bpl</link>
      <guid>https://dev.to/pranavkumar389/git-learn---modefast-2bpl</guid>
      <description>&lt;h2&gt;
  
  
  Version Control
&lt;/h2&gt;

&lt;p&gt;A version control system or VCS, also known as revision control or source control system, is a software utility that &lt;strong&gt;tracks&lt;/strong&gt; and &lt;strong&gt;manages&lt;/strong&gt; changes to a filesystem. A VCS also offers collaborative utilities to &lt;strong&gt;share&lt;/strong&gt; and &lt;strong&gt;integrate&lt;/strong&gt; these filesystem changes to other VCS users.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Popular software industry VCS options include Git, Mercurial, SVN and preforce. Here we will focus on &lt;code&gt;Git&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Git vs Github
&lt;/h2&gt;

&lt;p&gt;Git is &lt;strong&gt;not&lt;/strong&gt; Github. Haven't trust me?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Git&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Github&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Code lies.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;coneole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Code never lies.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Code&lt;/span&gt; &lt;span class="nx"&gt;never&lt;/span&gt; &lt;span class="nx"&gt;lies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Git&lt;/strong&gt; allows groups of people to work on the same documents (often code) at the same time, and without stepping on each other's toes. It's a &lt;a href="https://en.wikipedia.org/wiki/Distributed_version_control"&gt;distributed&lt;/a&gt; version control system.&lt;br&gt;
&lt;strong&gt;Github&lt;/strong&gt; is just a place to store your identical working directories - aka repositories, or repo's for short. It's literally a hub for Git repositories.&lt;/p&gt;
&lt;h2&gt;
  
  
  Installing Git
&lt;/h2&gt;

&lt;p&gt;To install Git, go to the &lt;a href="https://git-scm.com/download"&gt;official website&lt;/a&gt; and download the executable for your machine. I'm not going into the installation details as they're really just a bunch of &lt;code&gt;Next, Next, Next, Finish&lt;/code&gt; set of steps.&lt;/p&gt;

&lt;p&gt;To make sure your installation was successful, run the following command in your Terminal/Command prompt:&lt;br&gt;
&lt;code&gt;git --version&lt;/code&gt;&lt;br&gt;
You should get something like:&lt;br&gt;
&lt;code&gt;git version 2.15.1&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Let's Start
&lt;/h2&gt;

&lt;p&gt;First of all, make an empty directory. Open terminal/command prompt(Git Bash will be a great choice) and make sure that your current working directory is newly created one.&lt;br&gt;
To initialize a Git repository here, type the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git init
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Repository is a directory where Git has been initialized to start version controlling your files.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Notice a new hidden directory &lt;code&gt;.git&lt;/code&gt;. It has all sorts of directories and files inside it. You'll rarely ever need to do anything inside here but it's the guts of Git, where all the magic happens.&lt;/p&gt;

&lt;p&gt;Next up, let's type the &lt;code&gt;git status&lt;/code&gt; command to see what the current state of our project is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git status
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It's healthy to run &lt;code&gt;git status&lt;/code&gt; often. Sometimes things change and you don't notice it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;staged:&lt;br&gt;
Files are ready to be committed.&lt;br&gt;
unstaged:&lt;br&gt;
Files with changes that have not been prepared to be committed.&lt;br&gt;
untracked:&lt;br&gt;
Files aren't tracked by Git yet. This usually indicates a newly created file.&lt;br&gt;
deleted:&lt;br&gt;
A file has been deleted and is waiting to be removed from Git.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Suppose you have created a new file, let's say it demo.txt. Git will output that "demo.txt is &lt;code&gt;untracked&lt;/code&gt;".&lt;br&gt;
To tell Git to start tracking changes made to demo.txt, we first need to add it to the &lt;strong&gt;Staging Area&lt;/strong&gt; by using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git add demo.txt
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Staging Area:&lt;br&gt;
A place where we can group files together before we "commit" them to Git.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's run &lt;code&gt;git status&lt;/code&gt; again to see where we stand.&lt;br&gt;
Notice how Git says changes to be &lt;code&gt;committed&lt;/code&gt;? The files listed here are in the Staging Area, and they are not in our repository yet. We could add or remove files from the stage before we store them in the repository.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;add all:&lt;br&gt;
You can also type &lt;code&gt;git add -A .&lt;/code&gt; where the dot stands for the current directory, so everything in and beneath it is added. The -A ensures even file deletions are included.&lt;br&gt;
git reset:&lt;br&gt;
You can use git reset  to remove a file or files from the staging area.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To store our staged changes we run the commit command with a message describing what we've changed. Let's do that now by typing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git commit -m "initial commit"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Commit&lt;br&gt;
A "commit" is a snapshot of our repository. This way if we ever need to look back at the changes we've made (or if someone else does), we will see a nice timeline of all changes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So we've made a commit. Now let's browse them to see what we changed. We can do this by typing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git log
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Git's log as a journal that remembers all the changes we've committed so far, in the order we committed them. Use &lt;code&gt;git log --summary&lt;/code&gt; to see more information for each commit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Clap for your self. You are doing great. Now, let us move to the next level.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloning a repository
&lt;/h2&gt;

&lt;p&gt;In your organisation you will be provided with a link, which looks similar to this:&lt;br&gt;
&lt;code&gt;https://github.com/9kWorld/demoMain.git&lt;/code&gt;&lt;br&gt;
We are going to get this repository to our computer. This can be done by typing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git clone https://github.com/9kWorld/demoMain.git
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, you have a new folder &lt;code&gt;demoMain&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Remember, you shouldn't commit to master, &lt;strong&gt;EVER&lt;/strong&gt;?&lt;/p&gt;

&lt;h2&gt;
  
  
  Branching
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Branches&lt;/strong&gt; are what naturally happens when you want to work on multiple features at the same time. You wouldn't want to end up with a &lt;code&gt;master&lt;/code&gt; branch which has Feature A half done and Feature B half done.&lt;br&gt;
Rather you'd separate the code base into two "snapshots" (branches) and work on and commit to them separately. As soon as one was ready, you might merge this branch back into the master branch and push it to the remote server.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Master branch is the main of all other branches(if present).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's create a branch called &lt;code&gt;demoBranch&lt;/code&gt;, where we'll do all the work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git branch demoBranch
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Great! Now if you type &lt;code&gt;git branch&lt;/code&gt; you'll see two local branches: the main branch named &lt;code&gt;master&lt;/code&gt; and your new branch named &lt;code&gt;demoBranch&lt;/code&gt;.&lt;br&gt;
You can switch branches using the &lt;code&gt;git checkout &amp;lt;branch&amp;gt;&lt;/code&gt; command. Try it now to switch to the &lt;code&gt;demoBranch&lt;/code&gt; branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git checkout demoBranch
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Try &lt;code&gt;git checkout -b new_branch&lt;/code&gt;&lt;br&gt;
to checkout and create a branch at the same time. This is the same thing as doing:&lt;br&gt;
&lt;code&gt;git branch new_branch&lt;br&gt;
 git checkout new_branch&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Change whatever you have to do, fix bugs or add a new feature.&lt;br&gt;
Feel free to run &lt;code&gt;git status&lt;/code&gt; to check the changes you're about to commit.&lt;/p&gt;

&lt;p&gt;Now, you are ready to commit your changes.&lt;br&gt;
&lt;code&gt;git commit -m "your message here"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Great, now you just need to switch back to the &lt;code&gt;master&lt;/code&gt; branch so you can copy (or merge) your changes from the &lt;code&gt;demoBranch&lt;/code&gt; branch back into the &lt;code&gt;master&lt;/code&gt; branch.&lt;br&gt;
Go ahead and checkout the master branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git checkout master
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Alrighty, the moment has come when you have to merge your changes from the demoBranch branch into the master branch. Take a deep breath, it's not that scary.&lt;/p&gt;

&lt;p&gt;We're already in the &lt;code&gt;master&lt;/code&gt; branch, so we just need to tell Git to &lt;code&gt;merge&lt;/code&gt; the &lt;code&gt;demoBranch&lt;/code&gt; branch into it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git merge demoBranch
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Merge Conflicts&lt;/strong&gt; can occur when changes are made to a file at the same time. A lot of people get really scared when a conflict happens, but fear not! They aren't that scary, you just need to decide which code to keep. Take a look at &lt;a href="https://git-scm.com/docs/git-merge#_how_conflicts_are_presented"&gt;how conflicts are presented&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can use &lt;code&gt;git branch -d &amp;lt;branch name&amp;gt;&lt;/code&gt; to delete a branch if you don't need it anymore. Use &lt;code&gt;--force(-f)&lt;/code&gt; delete option to delete a branch if it has not been merged yet. This also can be done by:&lt;br&gt;
 &lt;code&gt;git branch -D wrong_feature&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The Final Push
&lt;/h2&gt;

&lt;p&gt;Here we are, at the last step.All that's left for you to do now is to push everything you've been working on to your remote repository, and you're done!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git push
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Finally, we did it.&lt;/p&gt;

&lt;p&gt;Hope this helped! Good luck.&lt;/p&gt;

</description>
      <category>git</category>
      <category>sourcecontrol</category>
    </item>
  </channel>
</rss>
