<?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: Manish</title>
    <description>The latest articles on DEV Community by Manish (@manish169).</description>
    <link>https://dev.to/manish169</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%2F81319%2F0cec6375-caa4-4e1b-a7ed-49004e8c1954.jpg</url>
      <title>DEV Community: Manish</title>
      <link>https://dev.to/manish169</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/manish169"/>
    <language>en</language>
    <item>
      <title>JSON.parse() kept failing with Ollama responses on localhost - spent 3 hours debugging, here's what worked 💪</title>
      <dc:creator>Manish</dc:creator>
      <pubDate>Tue, 02 Sep 2025 04:58:07 +0000</pubDate>
      <link>https://dev.to/manish169/jsonparse-kept-failing-with-ollama-responses-on-localhost-spent-3-hours-debugging-heres-what-1o79</link>
      <guid>https://dev.to/manish169/jsonparse-kept-failing-with-ollama-responses-on-localhost-spent-3-hours-debugging-heres-what-1o79</guid>
      <description>&lt;p&gt;Integrating llama3.2 into my internal tools has been one of the most sane parts of AI that I’ve been doing for the past few months, but last week it went insane. The API was responding perfectly, requests were perfectly hitting the desired endpoints, and when I checked my console, the JSON responses looked pristine 👌. &lt;/p&gt;

&lt;p&gt;But every single time I tried to parse the response, it would throw me a weird parsing error, which made no sense. The API was giving 200 status codes, the content-type header was set perfectly, so what else could go wrong?. In this guide, we will discover how I finally tracked down this sneaky JSON parsing bug that was hiding right under my nose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;While integrating llama3.2 into one of my internal tools, I faced a bizarre &lt;em&gt;JSON.parse()&lt;/em&gt; issue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Expected ',' or '}' after property value in JSON at position 350 (line 11 column 23)

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

&lt;/div&gt;



&lt;p&gt;At first glance, I thought it would be a simple fix, but I was wrong. This mentality drove me to spend endless hours debugging, starting with consoling the output I was receiving from the Ollama.&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%2Fmmkwlsjrss6k6nn2wtlc.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%2Fmmkwlsjrss6k6nn2wtlc.png" alt="Error-Description" width="800" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;Glimpsing at the response (without properly looking at it), I thought a simple &lt;em&gt;JSON.parse()&lt;/em&gt; would fix the issue. &lt;/p&gt;

&lt;p&gt;But then I noticed something else: two different syntactical outputs for two different inputs. But Why?&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%2Fbhf1r7kdfwju7yur7vhu.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%2Fbhf1r7kdfwju7yur7vhu.png" alt="First-Output" width="800" height="338"&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%2F5zb2hdjjvv3bedcknb2h.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%2F5zb2hdjjvv3bedcknb2h.png" alt="Second-Output" width="800" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s the point when I started to look into my prompt, which I was giving to llama3.2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
## Assessment Guidelines:

    1. **Be Conservative**: Err on the side of caution - if something could be interpreted as a violation, factor that into the risk score
    2. **Context Matters**: Consider the subreddit's culture and typical moderation practices
    3. **Cumulative Risk**: Multiple minor issues can compound into a higher risk
    4. **Moderator Discretion**: Remember that human moderators may interpret rules differently
    5. **Recent Trends**: Consider if the content type has been problematic recently

    ## Special Considerations:

    - **New Accounts**: Higher scrutiny for promotional content
    - **Community Guidelines**: Factor in Reddit's site-wide rules
    - **Subreddit Size**: Larger subreddits often have stricter enforcement
    - **Content Type**: Images, links, and text posts may have different risk profiles
    - **Timing**: Some content may be temporarily restricted during certain events

    **Subreddit Rules:**
    ${
      Array.isArray(subredditRules) &amp;amp;&amp;amp; subredditRules.length &amp;gt; 0
        ? subredditRules
            .map((rule, index) =&amp;gt; {
              // Handle different possible rule structures
              const ruleNumber = rule.number || rule.priority + 1 || index + 1;
              const ruleTitle =
                rule.title ||
                rule.short_name ||
                rule.violation_reason ||
                `Rule ${ruleNumber}`;
              const ruleDescription =
                rule.description ||
                rule.description_html?.replace(/&amp;lt;[^&amp;gt;]*&amp;gt;/g, "") ||
                "No description provided";

              return `${ruleNumber}. ${ruleTitle} - ${ruleDescription}`;
            })
            .join("\n")
        : "No specific subreddit rules provided"
    }

    **Post Title:** ${postTitle || "No title provided"}

    **Post Body:** ${postBody || "No body content provided"}

    Now analyze the provided content and respond with a JSON assessment.`;

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

&lt;/div&gt;



&lt;p&gt;Notice the last line where I say: Now analyze the provided content and respond with &lt;em&gt;JSON assessment&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Seemed okay to me the first time I wrote it. But the time I zoomed in and tested it with different variations, it hit me. 💥&lt;/p&gt;

&lt;p&gt;Basically, instructing Llama 3.2 to respond with a JSON assessment meant it would output &lt;em&gt;only&lt;/em&gt; the JSON assessment, whether or not that JSON was valid.&lt;/p&gt;

&lt;p&gt;So, tweaking the prompt a bit, instead of using &lt;em&gt;JSON.parse()&lt;/em&gt;, solved the problem. Here is the final version of the prompt I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
    ## Assessment Guidelines:

    1. **Be Conservative**: Err on the side of caution - if something could be interpreted as a violation, factor that into the risk score
    2. **Context Matters**: Consider the subreddit's culture and typical moderation practices
    3. **Cumulative Risk**: Multiple minor issues can compound into a higher risk
    4. **Moderator Discretion**: Remember that human moderators may interpret rules differently
    5. **Recent Trends**: Consider if the content type has been problematic recently

    ## Special Considerations:

    - **New Accounts**: Higher scrutiny for promotional content
    - **Community Guidelines**: Factor in Reddit's site-wide rules
    - **Subreddit Size**: Larger subreddits often have stricter enforcement
    - **Content Type**: Images, links, and text posts may have different risk profiles
    - **Timing**: Some content may be temporarily restricted during certain events

    **Subreddit Rules:**
    ${
      Array.isArray(subredditRules) &amp;amp;&amp;amp; subredditRules.length &amp;gt; 0
        ? subredditRules
            .map((rule, index) =&amp;gt; {
              // Handle different possible rule structures
              const ruleNumber = rule.number || rule.priority + 1 || index + 1;
              const ruleTitle =
                rule.title ||
                rule.short_name ||
                rule.violation_reason ||
                `Rule ${ruleNumber}`;
              const ruleDescription =
                rule.description ||
                rule.description_html?.replace(/&amp;lt;[^&amp;gt;]*&amp;gt;/g, "") ||
                "No description provided";

              return `${ruleNumber}. ${ruleTitle} - ${ruleDescription}`;
            })
            .join("\n")
        : "No specific subreddit rules provided"
    }

    **Post Title:** ${postTitle || "No title provided"}

    **Post Body:** ${postBody || "No body content provided"}

    Now analyze the provided content and respond with ONLY a valid JSON assessment. Fix any JSON formatting issues if there are any`;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Key takeaway
&lt;/h2&gt;

&lt;p&gt;Always double-check your prompt before building something with it, because a wrong prompt can lead to hours of debugging problems that never should have existed in the first place.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Merging Branches with git #Part 2.</title>
      <dc:creator>Manish</dc:creator>
      <pubDate>Sun, 29 Mar 2020 08:35:19 +0000</pubDate>
      <link>https://dev.to/manish169/merging-branches-with-git-part-2-43h2</link>
      <guid>https://dev.to/manish169/merging-branches-with-git-part-2-43h2</guid>
      <description>&lt;p&gt;So here we are with part 2 of our merging branches with GIT. in this tutorial we will discuss what happens when you try to merge a branch which is way too ahead of its original branch(in our case it is the master branch). &lt;/p&gt;

&lt;p&gt;So the setup is the same as in the previous tutorial. You can have a look at &lt;a href="https://gitlab.com/manish169/gitlab-example-for-dev.to"&gt;&lt;/a&gt; for reference.&lt;/p&gt;

&lt;p&gt;Let's continue our journey on merging the branches.&lt;/p&gt;

&lt;p&gt;For this tutorial, I have already made three commits in the branch 'gaurang'. You can see in the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S-1zDPLL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/fwl2i1kj0xzojfqu236y.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S-1zDPLL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/fwl2i1kj0xzojfqu236y.PNG" alt="" width="675" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you look carefully, you can see the current tip of our branch 'gaurang' is three steps/commits ahead of the master branch.&lt;/p&gt;

&lt;p&gt;So, what will happen now? We will merge 'gaurang' with 'master'. But before merging let's have to compare the code of both branches.&lt;/p&gt;

&lt;p&gt;Let's compare the code of two branches before merging:&lt;/p&gt;

&lt;p&gt;branch 'master' :&lt;br&gt;
&lt;/p&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 lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
  &amp;lt;!-- This is the change made by gaurang --&amp;gt;
&amp;lt;body &amp;gt;
  &amp;lt;!-- This is the change made by gaurang --&amp;gt;
  &amp;lt;p style="background-color: blue;"&amp;gt;Blue is my favorite color&amp;lt;/p&amp;gt;
  Just changed some Background Color of the Body
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;branch 'gaurang':&lt;br&gt;
&lt;/p&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 lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body &amp;gt;
  &amp;lt;p style="background-color: blue;"&amp;gt;Blue is my favorite color&amp;lt;/p&amp;gt;
  Just changed some Background Color of the Body
  &amp;lt;p style="background-color: brown;"&amp;gt;I hate Brown&amp;lt;/p&amp;gt;
  &amp;lt;p style="background-color: chocolate;"&amp;gt;I love Messi&amp;lt;/p&amp;gt;

  &amp;lt;!-- This is the change made by gaurang --&amp;gt;
  &amp;lt;p style="background-color:crimson;"&amp;gt;And I love Argetina&amp;lt;/p&amp;gt;
  &amp;lt;!-- This is the change made by gaurang --&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;So as you can see we have added three paragraphs in the body in branch 'gaurang'.&lt;/p&gt;

&lt;p&gt;Before merging let's make sure to fetch the changes in the local copy of the 'master' branch. If you don't fetch the latest changes, git will ask you to do so. Let's fetch:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kqHE6C-d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/khdirckbav7tk2g00kw9.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kqHE6C-d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/khdirckbav7tk2g00kw9.PNG" alt="" width="462" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see we have the latest changes in our branch. Now we can continue merging the branches. Let's run the merge 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 merge &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where the  is the name of the branch which is to be merged. In our case, it will be 'origin/gaurang'. So our command will look something 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;git merge origin/gaurang
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run the merge command the editor will ask for &lt;strong&gt;MERGE_MSG&lt;/strong&gt; by opening the file with the same name on your Editor. You can type whatever &lt;strong&gt;MERGE_MSG&lt;/strong&gt; you like. Once you have typed the command and closed the file the branches will be merged and you can see the changes in your code.&lt;/p&gt;

&lt;p&gt;As you can see we didn't see any merge conflicts in this merge because both developers didn't make the changes in the same file. If there were changes in the same file then we would have/had received merge conflicts and we had to resolve the conflicts manually.&lt;/p&gt;

&lt;p&gt;After that you have to run the git add and commit command subsequently as the tip of your master branch is still behind branch 'gaurang'.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Then you need to push the changes as you would normally 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 push origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can see the tip of your master branch is in Sync with the branch 'gaurang'&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tou8NGWo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/5jdyr8m9cz1mf9u07p9f.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tou8NGWo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/5jdyr8m9cz1mf9u07p9f.PNG" alt="After Merging" width="682" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it for this tutorial. We will talk about merging two branches and then syncing it with the master branch in the next tutorial.&lt;/p&gt;

</description>
      <category>git</category>
      <category>beginners</category>
      <category>merging</category>
    </item>
    <item>
      <title>Merging Branches with git.</title>
      <dc:creator>Manish</dc:creator>
      <pubDate>Sun, 29 Mar 2020 06:42:41 +0000</pubDate>
      <link>https://dev.to/manish169/merging-branches-with-git-46lc</link>
      <guid>https://dev.to/manish169/merging-branches-with-git-46lc</guid>
      <description>&lt;p&gt;If you are a newbie to programming you might come across a problem with merging your source code with another co-worker/person you are working with. It's like you have made some changes and pushed to your favorite version-control hosting platform and then someone has pushed the code to a new branch and now you have to manage the dirty process of merging their branches with yours. This tutorial deals with the same topic.&lt;/p&gt;

&lt;p&gt;OK, Let's start.&lt;/p&gt;

&lt;p&gt;So, let's first know what is Git?&lt;/p&gt;

&lt;p&gt;Git, as specified by &lt;a href="https://en.wikipedia.org/wiki/Git"&gt;Wikipedia&lt;/a&gt;, is a distributed version control system for tracking changes in source code during software development.&lt;/p&gt;

&lt;p&gt;In layman terms, it means that while you code you can save your changes with a message that probably reminds you of what work you had done.&lt;/p&gt;

&lt;p&gt;Now, to demonstrate the merging process in Git, we need an application with some code in it. Let's make a new angular app by running the &lt;strong&gt;ng new&lt;/strong&gt; 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;ng new new git-example-for-devto
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will generate a new application with a default component name AppComponent. The folder structure of our app looks like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;our-project-name&lt;br&gt;
   |&lt;br&gt;
   --- e2e&lt;br&gt;
   |&lt;br&gt;
   --- node_modules&lt;br&gt;
   |&lt;br&gt;
   --- src&lt;br&gt;
        |&lt;br&gt;
        --- app&lt;br&gt;
             |&lt;br&gt;
             --- app.component.html&lt;br&gt;
             |&lt;br&gt;
             --- app.component.css&lt;br&gt;
             |&lt;br&gt;
             --- app.component.ts&lt;br&gt;
   |&lt;br&gt;
   --- assets&lt;br&gt;
   |&lt;br&gt;
   --- enviornments&lt;br&gt;
   |&lt;br&gt;
   --- other files&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, we need to write some code in our app.component.html&lt;/p&gt;

&lt;p&gt;For this tutorial, I have written some basic code as our main focus is on merging the branches rather than writing the code. Here is the code for this post:&lt;br&gt;
&lt;/p&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 lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;title&amp;gt;Example&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body &amp;gt;
  &amp;lt;!-- Changes from my computer --&amp;gt;
  &amp;lt;p style="background-color: black; color: white;"&amp;gt;This text is from my computer&amp;lt;/p&amp;gt;
  &amp;lt;!-- Changes from my computer --&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;To demonstrate changes I made from my machine, I have enclosed the code around comments which says&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!-- Changes from my computer --&amp;gt;
Some Code here...
&amp;lt;!-- Changes from my computer --&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For remote machine, I will enclose the code around comments which says&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!-- Changes made by &amp;lt;person-name&amp;gt; --&amp;gt;
Some Code here...
&amp;lt;!-- Changes made by &amp;lt;person-name&amp;gt;--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Git to work properly it requires a version-control hosting platform where all your code is saved. A version-control hosting platform is a place where all the files of your code live.&lt;/p&gt;

&lt;p&gt;For this tutorial we will use GitLab as our Hosting Platform, you can use whichever you like.&lt;/p&gt;

&lt;p&gt;I have already set up my project so I won't go into detail in that. If you don't know how to set up a project under GitLab, you can have a look at this &lt;a href="https://docs.gitlab.com/ee/gitlab-basics/"&gt;guide&lt;/a&gt;. So here is my project setup:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vhL3Oqy---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/r6gjwt2d32xfw0l6diyd.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vhL3Oqy---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/r6gjwt2d32xfw0l6diyd.PNG" alt="Project Setup" width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, you can have a look there are two branches named 'master' (which is the default branch and 'gaurang' a branch pulled out from master. Now we will merge branch 'gaurang' with branch 'master'.&lt;/p&gt;

&lt;p&gt;Before merging, we will make sure we have the latest pull of our code. For that we will execute 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 fetch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will fetch all the commits to your local working copy of your Source Code.&lt;/p&gt;

&lt;p&gt;Now let's merge our two branches. For merging there will be two branches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, the branch in which we are merging the changes i.e. receiving branch i.e. master&lt;/li&gt;
&lt;li&gt;Second, the branch which we will be merging i.e. gaurang.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The command for merging is:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;where the branch name is the branch which is to be merged i.e. 'gaurang'. Remember the  here will be always the branch which is to be merged no the branch in which we are merging. Let's execute that command.&lt;/p&gt;

&lt;p&gt;As you can see in the screenshot below git automatically tries to merge the changes but if two persons have made changes to the same file then it will show a 'MERGE CONFLICT' and the merge will fail. This means you have to resolve the conflicts yourself manually.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--plep7oq9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/qmcbkzba7vq8x33t4s2z.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--plep7oq9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/qmcbkzba7vq8x33t4s2z.PNG" alt="Git Merge" width="487" height="66"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's do it.&lt;/p&gt;

&lt;p&gt;As we can see in the screenshot the file in which merge conflict is there in src/app/app.component.html. Let's open that file.&lt;/p&gt;

&lt;p&gt;After we have opened our file, we will see two types of changes denoted by:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; HEAD(Current Change)
- &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; origin/gaurang(Incoming Change)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Current Change&lt;/strong&gt; is the change that we have done in our master branch and our HEAD is currently at that change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Incoming Change&lt;/strong&gt; is the change that is done in another branch.&lt;/p&gt;

&lt;p&gt;So, we have to accept either of the two to resolve the conflicts. So, the deciding factor in choosing which changes to keep is the latest change or the latest code. If the developer who is maintaining the branch named 'gaurang' has made the latest changes then that changes should be accepted and not the changes are done in the 'master' branch.&lt;/p&gt;

&lt;p&gt;So, let's accept the Incoming change. You can accept the Incoming changes by clicking on the 'Accept Incoming Changes'&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gN3OOnX_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/drba3dsi6xfzkdy861kh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gN3OOnX_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/drba3dsi6xfzkdy861kh.PNG" alt="Accept Incoming Changes" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Code before Accepting Incoming CHanges is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://paste.ofcode.org/zEtJmsw9ue89jNTpw23tqQ"&gt;https://paste.ofcode.org/zEtJmsw9ue89jNTpw23tqQ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Code after Accepting Incoming Changes is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://paste.ofcode.org/3axvjm5ThdE2FfWjHvNnFQh"&gt;https://paste.ofcode.org/3axvjm5ThdE2FfWjHvNnFQh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once, you have resolved the merge conflict then you have to add the conflicted files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add &amp;lt;name-of-the-conflicted-file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and commit the changes (as you would do normally)&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 "COmmit message"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that we need to push the changes to the receiving branch i.e. master:&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 master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After pushing if you see the Graph of the changes you will see something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vrw7lUtZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/yqd02nmrzyd07b73fuep.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vrw7lUtZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/yqd02nmrzyd07b73fuep.PNG" alt="Merge Final" width="699" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This means that our branches have been merged successfully.&lt;/p&gt;

&lt;p&gt;Happy Coding.&lt;/p&gt;

&lt;p&gt;The Complete Source Code for this project is available at &lt;a href="https://gitlab.com/manish169/gitlab-example-for-dev.to/"&gt;Gitlab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S.: In the next tutorial we will see what if the current tip of the main branch is ahead of the feature branch.&lt;/p&gt;

</description>
      <category>git</category>
      <category>gitlab</category>
      <category>merging</category>
      <category>angular</category>
    </item>
    <item>
      <title>Getting Started with Angular</title>
      <dc:creator>Manish</dc:creator>
      <pubDate>Sun, 22 Mar 2020 04:25:51 +0000</pubDate>
      <link>https://dev.to/manish169/getting-started-with-angular-1hag</link>
      <guid>https://dev.to/manish169/getting-started-with-angular-1hag</guid>
      <description>&lt;p&gt;First of All, what is Angular?&lt;/p&gt;

&lt;p&gt;Angular is a open source typescript based framework used to develop Single Page Applications(SPA).&lt;/p&gt;

&lt;p&gt;Okay, now what the heck is SPA?&lt;/p&gt;

&lt;p&gt;This was the question, i stumbled upon when i first started learning Angular. So  Single Page Application(SPA) is a advanced approach where the data is not rendered statically from HTML pages but through JavaScript(in our case , typescript).&lt;/p&gt;

&lt;p&gt;Now, How do we get started with Angular?&lt;/p&gt;

&lt;p&gt;To get started with Angular you need to install &lt;a href="https://cli.angular.io/"&gt;Angular CLI&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;First, you need to install Angular CLI from using 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;npm install -g @angular/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The -g flag tells command line to install Angular globally. The latest version of Angular is v9.1.0.&lt;/p&gt;

&lt;p&gt;You can follow the documentation at the &lt;a href="https://cli.angular.io/"&gt;Angular CLI&lt;/a&gt; on how to setup a new project. &lt;/p&gt;

&lt;p&gt;After, you have setup a new project then you have to open the project inside you favorite Editor. I am using Visual Studio Editor, you can use any other editor as per your needs. &lt;/p&gt;

&lt;p&gt;Let's create a application which displays a table of famous NBA players.&lt;/p&gt;

&lt;p&gt;For reference, we will be display result as follows &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s0Yxdpp2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/qzvmiuq6adkzqcsbz74v.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s0Yxdpp2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/qzvmiuq6adkzqcsbz74v.PNG" alt="" width="800" height="133"&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, we need to generate a new angular using the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng new example-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And after that we need to add bootstrap to our angular project by including the following CDN link in our index.html:&lt;/p&gt;



&lt;p&gt;After that we need to go to &lt;a href="https://getbootstrap.com/docs/"&gt;Bootstrap Docs&lt;/a&gt; and go to tables section. &lt;/p&gt;

&lt;p&gt;Now we are gonna type the code in our project. After we have type the code in our project, our application will look something like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QP4W0ZwW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/9smy6ggdj2uma9oaql9f.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QP4W0ZwW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/9smy6ggdj2uma9oaql9f.PNG" alt="" width="800" height="132"&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can see the result by running the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng serve -o
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will compile your project and open it in your favorite Browser. &lt;/p&gt;

&lt;p&gt;That's all for this article. In the next article we will try and replace the static data with Real-time data.&lt;/p&gt;

&lt;p&gt;Here is the link to the &lt;a href="https://gitlab.com/manish169/example-project"&gt;Gitlab Project&lt;/a&gt; if anyone is interested. &lt;/p&gt;

</description>
      <category>angular</category>
      <category>newbie</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Markdown Tutorial</title>
      <dc:creator>Manish</dc:creator>
      <pubDate>Mon, 27 May 2019 05:58:03 +0000</pubDate>
      <link>https://dev.to/manish169/markdown-tutorial-1f3</link>
      <guid>https://dev.to/manish169/markdown-tutorial-1f3</guid>
      <description>&lt;p&gt;This tutorial teaches you the basic of Markdown language. Markdown is a lightweight markup language which is used to add formatting to plain text. Let's get started.&lt;/p&gt;

&lt;h1&gt;
  
  
  Heading
&lt;/h1&gt;

&lt;p&gt;You can add a heading in Markdown by adding # in front of the heading you want to put. For E.g:&lt;/p&gt;

&lt;h1&gt;
  
  
  Heading 1
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Heading 2
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Heading 3
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Heading 4
&lt;/h4&gt;

&lt;h5&gt;
  
  
  Heading 5
&lt;/h5&gt;

&lt;h6&gt;
  
  
  Heading 6
&lt;/h6&gt;

&lt;p&gt;You can out a maximum of 6 headings in a Markdown.&lt;/p&gt;

&lt;h1&gt;
  
  
  Paragraphs
&lt;/h1&gt;

&lt;p&gt;For paragraphs you need to use a blank line to create a new line and add the text in there. For e.g.: &lt;/p&gt;

&lt;p&gt;This is the first paragraph.&lt;/p&gt;

&lt;p&gt;This is the second paragraph.&lt;/p&gt;

&lt;p&gt;This is the third paragraph.&lt;/p&gt;

&lt;p&gt;You can add as many as paragraph you want in Markdown. It is the same as we do in plain text.&lt;/p&gt;

&lt;h1&gt;
  
  
  Line Breaks
&lt;/h1&gt;

&lt;p&gt;In Markdown to add a line break  you need to type two to three spaces and then press return. Here is the example:&lt;/p&gt;

&lt;p&gt;This is the first line.&lt;br&gt;&lt;br&gt;
Now you have the second line.&lt;/p&gt;

&lt;p&gt;You can add as many as line you want in Markdown.&lt;/p&gt;
&lt;h1&gt;
  
  
  Emphasis
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Bold
&lt;/h2&gt;

&lt;p&gt;To bold a text you need to put the text in Double Asterisk &lt;strong&gt;Bold&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Italic
&lt;/h2&gt;

&lt;p&gt;To italic a text you need to put the text in Single Asterisk i.e. &lt;em&gt;Italic&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Bold &amp;amp; Italic
&lt;/h2&gt;

&lt;p&gt;Markdown provides a functionality where you can Bold &amp;amp; Italic the text at the same time. See the below example for further reference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bold &amp;amp; Italic&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  Block quotes
&lt;/h1&gt;

&lt;p&gt;A block quotation (also known as a long quotation or extract) is a quotation in a written document that is set off from the main text as a paragraph.&lt;/p&gt;

&lt;p&gt;So in order to use a text as Block Quote, you need to use the angular bracket '&amp;gt;' in front of the text you want to set as a block quote. For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is a first line in Block Quote&lt;/p&gt;

&lt;p&gt;This is a second line in a Block Quote.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  Nested Block quotes
&lt;/h1&gt;

&lt;p&gt;You can use a block quote inside a block quote. For e.g.:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is a single block quote.&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; This is a nested block quote.
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;The syntax for this is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;This is a single block quote.
&amp;gt;
&amp;gt;      This is a nested block quote.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the end of the Part 1 of the two series of our Markdown Tutorial.&lt;/p&gt;

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