<?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>Forem: Yeganathan S</title>
    <description>The latest articles on Forem by Yeganathan S (@yeganathan).</description>
    <link>https://forem.com/yeganathan</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%2F497943%2F15bb4cfb-698a-48d2-8c61-4d44dfe0af90.jpg</url>
      <title>Forem: Yeganathan S</title>
      <link>https://forem.com/yeganathan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/yeganathan"/>
    <language>en</language>
    <item>
      <title>Every developer should have these three things</title>
      <dc:creator>Yeganathan S</dc:creator>
      <pubDate>Wed, 05 Jan 2022 14:07:34 +0000</pubDate>
      <link>https://forem.com/yeganathan/every-developer-should-have-these-three-things-19eh</link>
      <guid>https://forem.com/yeganathan/every-developer-should-have-these-three-things-19eh</guid>
      <description>&lt;p&gt;Hi there, &lt;/p&gt;

&lt;p&gt;Starting career as a software developer? Then this article is for you! Here I'm gonna discuss three main things that every developer should have. Being a developer myself, I found out how important they are. So let's start!&lt;/p&gt;

&lt;h2&gt;
  
  
  LinkedIn
&lt;/h2&gt;

&lt;p&gt;LinkedIn is one of the power tools which helps you connect with people, strengthen professional relationships and find the right job or internship. It provides a professional environment where people share their learnings, interview experiences, and many more. Even if you are not a developer, LinkedIn helps you connect with the people in your field of interest. You could connect with experts from top companies and ask your queries directly regarding the role, interview preparation, and more.&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%2Fimages.unsplash.com%2Fphoto-1585288766827-c62e98d70191%3Fixlib%3Drb-1.2.1%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" 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%2Fimages.unsplash.com%2Fphoto-1585288766827-c62e98d70191%3Fixlib%3Drb-1.2.1%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" alt="https://images.unsplash.com/photo-1585288766827-c62e98d70191?ixlib=rb-1.2.1&amp;amp;q=85&amp;amp;fm=jpg&amp;amp;crop=entropy&amp;amp;cs=srgb"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main reason I joined LinkedIn was to make connections with talented professionals in my domain of interest. It's not just about creating an account on LinkedIn but optimizing the profile perfectly also matters. &lt;/p&gt;

&lt;p&gt;To make it simple, LinkedIn is another version of your resume. Sometimes while recruiters search for professionals, one might look into your profile, which could eventually lead to job opportunities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Github
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Github&lt;/strong&gt; is one of the core elements of every developer's life. For those who don't know about the platform, it's the place where ideas get crafted by builders, codes are stored/shared, and collaborations with other developers happen. Although there are quite a few platforms with the same beat, Github is still considered to be one of the most popular platforms in the developers' community. &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%2Fimages.unsplash.com%2Fphoto-1618401471353-b98afee0b2eb%3Fixlib%3Drb-1.2.1%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" 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%2Fimages.unsplash.com%2Fphoto-1618401471353-b98afee0b2eb%3Fixlib%3Drb-1.2.1%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" alt="https://images.unsplash.com/photo-1618401471353-b98afee0b2eb?ixlib=rb-1.2.1&amp;amp;q=85&amp;amp;fm=jpg&amp;amp;crop=entropy&amp;amp;cs=srgb"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is a paradise for many developers. Most recruiters check our Github profile for our past projects as it shows the consistency and gradually working with tools &amp;amp; technologies. There are n-number of open-source projects to work on in Github. Same as in LinkedIn we can collaborate with other developers on Github, especially on open-source projects, and learn from them. Anyone who loves to code can contribute, so why wait? Start your contribution today.🛠&lt;/p&gt;

&lt;h2&gt;
  
  
  Portfolio / Personal Website
&lt;/h2&gt;

&lt;p&gt;Last but not least, every developer should have a portfolio that shows their skills and achievements. Your portfolio has to display that you're a technology expert and that you write good quality code. If you've worked on personal projects a lot and the technology you've used is relevant then you should include them in your portfolio. &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%2Fimages.unsplash.com%2Fphoto-1545665277-5937489579f2%3Fixlib%3Drb-1.2.1%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" 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%2Fimages.unsplash.com%2Fphoto-1545665277-5937489579f2%3Fixlib%3Drb-1.2.1%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" alt="https://images.unsplash.com/photo-1545665277-5937489579f2?ixlib=rb-1.2.1&amp;amp;q=85&amp;amp;fm=jpg&amp;amp;crop=entropy&amp;amp;cs=srgb"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It simply serves as proof of your accomplishments. By now, you may wonder, why have both Github and Portfolio when both more or less shows our skills? Well, in Github you show only your technical side whereas, in a portfolio, you could also add non-technical side achievements and a lot more about you.&lt;/p&gt;

&lt;p&gt;I want to conclude that these, although the key elements are not the only requirements that a developer should fulfill. Just creating an account on LinkedIn or Github or making a simple portfolio doesn't make much impact, and that optimizing those matters equally. &lt;/p&gt;

&lt;p&gt;Hope this article helps you,&lt;/p&gt;

&lt;p&gt;Happy Coding❤️&lt;/p&gt;

</description>
      <category>devs</category>
      <category>career</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Updating the deployed hugo site</title>
      <dc:creator>Yeganathan S</dc:creator>
      <pubDate>Fri, 19 Mar 2021 08:17:58 +0000</pubDate>
      <link>https://forem.com/yeganathan/updating-the-deployed-hugo-site-2m7e</link>
      <guid>https://forem.com/yeganathan/updating-the-deployed-hugo-site-2m7e</guid>
      <description>&lt;p&gt;Hi there!&lt;br&gt;
In the previous article, we were discussing how to create a portfolio with Hugo and deploying the same in Github pages. if you didn't check out yet, then do check out &lt;a href="https://dev.to/yeganathan18/create-and-deploy-your-hugo-site-52ek"&gt;here&lt;/a&gt; and give it a read 😃&lt;/p&gt;

&lt;p&gt;This blog is a continuation of the same and in this, I'm going to share how to update hugo site which has already been deployed.&lt;/p&gt;

&lt;p&gt;For instance, let's say I need to add my previous article to the blog section of my portfolio and update the same in the deployed site.&lt;/p&gt;

&lt;p&gt;Since we created 2 separate repos for our hugo site, we need to push commits of both the repositories ( &lt;code&gt;hugo_site&lt;/code&gt; and &lt;code&gt;username.github.io&lt;/code&gt; )&lt;/p&gt;

&lt;p&gt;In order to start, we need to open our &lt;code&gt;hugo_site&lt;/code&gt; directory in the terminal.&lt;/p&gt;

&lt;p&gt;First, make sure all the commits in local and remote are the same. so let's pull those if there are any changes in the remote.&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 origin 
$ git rebase origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now as usual open the files in the editor and shoot up the terminal and write the following commands in order to start our local server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ hugo server -D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do the updates/changes and make sure everything is perfect.&lt;/p&gt;

&lt;p&gt;Stop the server now and type the following commands in the terminal...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ hugo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This is to regenerate HTML files in our &lt;code&gt;username.github.io&lt;/code&gt; submodule&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After generating the HTML files, go to the &lt;code&gt;username.github.io&lt;/code&gt; directory and push all the commits to the same.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd &amp;lt;username.github.io&amp;gt;
$ git add .
$ git commit -m "committing the regenerated html files"
$ git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;the last command triggers Github to rebuild our page with the changes we've made.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now again come back to the parent/previous directory and push all those commits to our &lt;code&gt;hugo_site&lt;/code&gt; repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd ..
$ git add .
$ git commit -m "committing the hugo changes and updated submodule"
$ git push origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Note ⚠️&lt;br&gt;
Make sure that you push files to the respective repos and branches.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: src refspec master does not match any
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;If you face any similar error like this then probably you should check the branching you're pushing.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Pro-Tips for faster page loads 🔫
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Check &lt;a href="https://developers.google.com/speed/pagespeed/insights/" rel="noopener noreferrer"&gt;PageSpeed&lt;/a&gt; always after deployment. &lt;/li&gt;
&lt;li&gt;Avoid using 4k resolution images or videos on your site. &lt;/li&gt;
&lt;li&gt;Try using Webp format for images rather than jpeg and png.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hope this article helps you!&lt;br&gt;
Happy coding 👨🏻‍💻&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>git</category>
      <category>hugo</category>
      <category>deploy</category>
    </item>
    <item>
      <title>Create and Deploy your portfolio with Hugo!</title>
      <dc:creator>Yeganathan S</dc:creator>
      <pubDate>Thu, 04 Feb 2021 18:27:55 +0000</pubDate>
      <link>https://forem.com/yeganathan/create-and-deploy-your-hugo-site-52ek</link>
      <guid>https://forem.com/yeganathan/create-and-deploy-your-hugo-site-52ek</guid>
      <description>&lt;p&gt;Hello everyone 👋🏻&lt;/p&gt;

&lt;p&gt;Have you just thought of making a portfolio or any static site then you're in the right place. In this article, I'm gonna share my experience ( also experiment ) with &lt;strong&gt;Hugo&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But before getting into it, let me give a brief introduction about Hugo...&lt;/p&gt;

&lt;h4&gt;
  
  
  What is Hugo?
&lt;/h4&gt;

&lt;p&gt;Hugo is a general-purpose website framework. Technically speaking, Hugo is a static site generator. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website’s end users and an ideal writing experience for website authors.&lt;/p&gt;

&lt;h4&gt;
  
  
  What we are going to do?
&lt;/h4&gt;

&lt;p&gt;We're gonna take a theme and customize as per our needs and deploy it on Github pages.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why Github pages?
&lt;/h4&gt;

&lt;p&gt;This is one of the easiest and simplest way of all. But still, we can also do the same in any other services like Netlify, Heroku and etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites 🚀
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hugo and Git should be installed. if you didn't install it yet, then check out the following links.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;[1] - &lt;a href="https://gohugo.io/getting-started/quick-start/" rel="noopener noreferrer"&gt;Installation of Hugo&lt;/a&gt;&lt;br&gt;
[2] - &lt;a href="https://www.atlassian.com/git/tutorials/install-git" rel="noopener noreferrer"&gt;Installation of Git&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Github account and knowledge of basic git commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To make it simple, I have made this blog into step by step process just like farming 🍀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's start making wonders with Hugo 🎉&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Preparation of soil 🪵
&lt;/h2&gt;

&lt;p&gt;The best part of Hugo is, we can take a theme and pretty much work on it just like a word doc. so I have chosen a template already if u didn't yet, then go and find one for yourself  &lt;a href="https://themes.gohugo.io" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is the template I have chosen for today's demo &lt;a href="https://github.com/rhazdon/hugo-theme-hello-friend-ng" rel="noopener noreferrer"&gt;Hello-friend-ng&lt;/a&gt; 💐&lt;/p&gt;
&lt;h4&gt;
  
  
  Sneak peek of it 🤩
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2tnarvwgxz88k3attm3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2tnarvwgxz88k3attm3x.png" alt="Template" width="800" height="827"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Note:
&lt;/h4&gt;

&lt;p&gt;Github pages can't render Hugo files directly so we will be creating 2️⃣ repositories. Once we complete making changes in the template, Hugo helps us to generate static files. The reason for the 2️⃣ repositories is that one is used for Hugo files and the other for static files generated out of it.&lt;/p&gt;

&lt;p&gt;Hope you have installed Hugo &amp;amp; git already, now it's time to fire up your terminal.&lt;/p&gt;

&lt;p&gt;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;$ hugo new site quickstart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;quickstart - it's just a directory name the files will be created.&lt;br&gt;
After doing the same now, if you check out the quickstart directory you will be seeing some files/folders. Those are necessary files required for any hugo site and hugo generates those for us.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now let's move into the quickstart directory and import the theme,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd quickstart
$ git init
$ git submodule add &amp;lt;them_github_repo_link&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: An empty git repository is initialized inside the quickstart directory so that we can add the theme as a submodule.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now when you check the themes directory you will be seeing all those files of our theme.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sowing ⚙️
&lt;/h2&gt;

&lt;p&gt;There will be an examplesite folder inside the themes directory, copy and &lt;strong&gt;replace&lt;/strong&gt; all the contents of examplesite under project directory ( or outside of themes directory )&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl8cwqvtcrzeiemmh7sgg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl8cwqvtcrzeiemmh7sgg.png" alt="Alt Text" width="504" height="1258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it comes to hugo, config.toml is the main file for our site.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyyg3xz29yb3cj20z2xc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyyg3xz29yb3cj20z2xc7.png" alt="Alt Text" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Look at the config.toml file and change the necessary details in it except the baseURL.&lt;/p&gt;

&lt;p&gt;We can find a description/comments of each variable inside the config.toml so that we can make changes without messing up with the other things.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;baseURL = "localhost"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;baseURL should be always localhost before deployment. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Prototype 🔫
&lt;/h2&gt;

&lt;p&gt;Shoot up the terminal now...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ hugo server
Start building sites … 

                   | EN | FR  
-------------------+----+-----
  Pages            | 35 | 21  
  Paginator pages  |  0 |  0  
  Non-page files   |  0 |  0  
  Static files     | 12 | 12  
  Processed images |  0 |  0  
  Aliases          | 18 |  7  
  Sitemaps         |  2 |  1  
  Cleaned          |  0 |  0  

Built in 65 ms
Watching for changes in /Users/yeganathan/quickstart/{archetypes,content,data,layouts,static,themes}
Watching for config changes in /Users/yeganathan/quickstart/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open a browser and enter the webserver address (localhost) to see the changes made. We can also make changes/ add content once we start our live local server and see the result instantly, this makes it even easier since we can see the result once we save our file with each change made.&lt;/p&gt;

&lt;p&gt;We can also edit the core components of the theme by editing the required file for the required component inside the themes directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding manure and fertilizers 🌱
&lt;/h2&gt;

&lt;p&gt;We can also add few more components other than in the theme...&lt;/p&gt;

&lt;p&gt;For instance,&lt;/p&gt;

&lt;p&gt;If we need an extra menu (Photography) apart from the one given in the theme, we can easily make one by editing the config.toml&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[menu]
  [[menu.main]]
    identifier = "about"
    name       = "About"
    url        = "about/"
  [[menu.main]]
    identifier = "posts"
    name       = "Posts"
    url        = "posts/"
  [[menu.main]]
    identifier = "photography"
    name       = "Photography"
    url        = "photography/"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;also, the contents of the page can be added to the content directory same as posts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9easomzpwjnk6tk7knts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9easomzpwjnk6tk7knts.png" alt="Alt Text" width="800" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically, we can add anything that we want on our site. Just go around the files and start doing wonders ✨&lt;/p&gt;

&lt;h2&gt;
  
  
  Irrigation 📦
&lt;/h2&gt;

&lt;p&gt;So for we made changes to our site and the files are only in our local system, in order to deploy in web it should be stored in remote right!? here comes &lt;strong&gt;Github&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;As said already we need 2️⃣ repos for our hugo site.&lt;/p&gt;

&lt;p&gt;Create your 2️⃣ remote repos on Github, one as &lt;strong&gt;[username].github.io&lt;/strong&gt; and the other as &lt;strong&gt;quickstart&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Remember ⚠️ &lt;br&gt;
The &lt;strong&gt;quickstart&lt;/strong&gt; is nothing but the project_name we can always use anything of our own but keep in mind that it should be uniform throughout the process.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;when creating [username].github.io repo always includes file .gitignore so that it won't shoot an error.&lt;/p&gt;

&lt;p&gt;Inside the .gitignore file,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;categories/*
tags/*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write the following commands in terminal...&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 https://github.com/&amp;lt;github_username&amp;gt;/quickstart.git
$ git add .
$ git commit -m "Initial commit for our Hugo site."
$ git submodule add https://github.com/&amp;lt;github_username&amp;gt;/&amp;lt;github_username&amp;gt;.github.io.git
$ git add .
$ git commit -m "Initial commit for our generated HTML."
$ git push -u origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;this only pushes to quickstart repo.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We still need to generate our HTML pages for our [github_username] repo, but before generating we need to change our config.toml file to output our HTML files to our submodule [github_usernam].github.io.&lt;/p&gt;

&lt;p&gt;Open your config.toml&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0nxm78ogsl53q676wc68.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0nxm78ogsl53q676wc68.png" alt="Alt Text" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Change these things to as shown below...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foegkzvv7fcts8ax5qrvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foegkzvv7fcts8ax5qrvh.png" alt="Alt Text" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hugo already has a built-in command, that generates your files to a Public folder.&lt;/p&gt;

&lt;p&gt;Let’s generate them by running 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;$ hugo
Start building sites … 

                   | EN | FR  
-------------------+----+-----
  Pages            | 35 | 21  
  Paginator pages  |  0 |  0  
  Non-page files   |  0 |  0  
  Static files     | 12 | 12  
  Processed images |  0 |  0  
  Aliases          | 18 |  7  
  Sitemaps         |  2 |  1  
  Cleaned          |  0 |  0  

Total in 136 ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that should be it. If you look in your [github_username].github.io folder now you should see HTML and CSS files, stuff that Github pages understand❗️&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F79c2pvx2mqdmboh12plw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F79c2pvx2mqdmboh12plw.png" alt="Alt Text" width="500" height="1348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before we finally deploy, we need to make sure our remotes are set up correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd &amp;lt;github_username&amp;gt;.github.io
$ git remote -v
&amp;gt; origin https://github.com/&amp;lt;github_username&amp;gt;/&amp;lt;github_username&amp;gt;.github.io.git (fetch)
&amp;gt; origin https://github.com/&amp;lt;github_username&amp;gt;/&amp;lt;github_username&amp;gt;.github.io.git (push)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now after doing the above, you should probably see the same fetch and push.&lt;/p&gt;

&lt;h2&gt;
  
  
  Harvesting 🌾
&lt;/h2&gt;

&lt;p&gt;We are gonna push all those generated HTML and CSS files to [github_username].github.io repo&lt;/p&gt;

&lt;p&gt;Once again make sure your inside [github_username].github.io directory in the terminal...&lt;/p&gt;

&lt;p&gt;Now let’s host it!&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 "Hosting my first Hugo website!"
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now go and check the [github_username].github.io repo&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftwa5ou9h0acpv1liqq68.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftwa5ou9h0acpv1liqq68.png" alt="Alt Text" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;you will see Github pages in the repo, click that&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm4a3edu5ftuyfp49h0ek.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm4a3edu5ftuyfp49h0ek.png" alt="Alt Text" width="800" height="143"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If your deployment didn't show up wait for a couple of minutes and reload the same.&lt;/p&gt;

&lt;p&gt;Finally, we hosted our first Hugo site 🥳 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l4RouGMf2234nMSCU9/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l4RouGMf2234nMSCU9/giphy.gif" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to check out 👉🏻 &lt;a href="https://yeganathan18.github.io" rel="noopener noreferrer"&gt;my portfolio&lt;/a&gt; 👈🏻&lt;/p&gt;

&lt;p&gt;Do Like 👍 and follow for more interesting blogs 👨🏻‍💻&lt;br&gt;
Comment you're valuable feedbacks down ✌️&lt;/p&gt;

</description>
      <category>hugo</category>
      <category>portfolio</category>
      <category>git</category>
      <category>ghpages</category>
    </item>
    <item>
      <title>Squashing commits in Git!</title>
      <dc:creator>Yeganathan S</dc:creator>
      <pubDate>Fri, 04 Dec 2020 17:16:06 +0000</pubDate>
      <link>https://forem.com/yeganathan/squash-commits-in-github-235i</link>
      <guid>https://forem.com/yeganathan/squash-commits-in-github-235i</guid>
      <description>&lt;p&gt;Hello Everyone! back with another topic, Have ever felt that your repository in Github has a lot of commits history in which few don't make sense? for example, fixing typos in the readme in my case. If you're a Beginner then you may think of creating a new repo and push all those pretty useless commits in a single commit message "First commit". Well, then you're in the right place. Actually, there is a way you can squash multiple commits into a single one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basically, We squash commits to make our git log more concise.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Git should be installed.&lt;/li&gt;
&lt;li&gt;Knowledge of Terminal and Git commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚠️ Disclaimer ⚠️&lt;br&gt;
Before experimenting with these, always have a backup of your files!&lt;/p&gt;

&lt;p&gt;All being set let's dive into our topic! For easy understanding, I broke this into pieces and tried explaining in a noob way.&lt;/p&gt;
&lt;h3&gt;
  
  
  Getting Started 🥳
&lt;/h3&gt;

&lt;p&gt;This is the commits history of my example repo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbxy3wt25t2c8ctc2gohj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbxy3wt25t2c8ctc2gohj.png" alt="Alt Text" width="800" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So in the above example, I don't want the 5 commits history which is in-between the last and first since it doesn't make sense. let's make those commits history into a single commit!&lt;/p&gt;

&lt;p&gt;Shoot up the terminal and go to your repo folder directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd &amp;lt;repo-folder&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure your repo folder is updated with all those commits you made and Write 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 rebase -i HEAD~&amp;lt;n&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;In this case we are gonna give n as 6, where n is the number of commits history we need and these commits are from top-bottom. if we give n including the first commit we made, probably it shoots an error.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Experimenting 🧪
&lt;/h3&gt;

&lt;p&gt;Executing the previous step will bring up the below interface with commit history and options to perform the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pick d8c1963 Adding contents
pick 5e4ea01 added
pick a3e1b06 removed few content
pick f9d4b67 Added few contents
pick 9e69811 Fixed typos and added content
pick 42dbace final

# Rebase 5f5302b..42dbace onto f9d4b67 (6 commands)
#
# Commands:
# p, pick &amp;lt;commit&amp;gt; = use commit
# r, reword &amp;lt;commit&amp;gt; = use commit, but edit the commit message
# e, edit &amp;lt;commit&amp;gt; = use commit, but stop for amending
# s, squash &amp;lt;commit&amp;gt; = use commit, but meld into previous commit
# f, fixup &amp;lt;commit&amp;gt; = like "squash", but discard this commit's log message
# x, exec &amp;lt;command&amp;gt; = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop &amp;lt;commit&amp;gt; = remove commit
# l, label &amp;lt;label&amp;gt; = label current HEAD with a name
# t, reset &amp;lt;label&amp;gt; = reset HEAD to a label
# m, merge [-C &amp;lt;commit&amp;gt; | -c &amp;lt;commit&amp;gt;] &amp;lt;label&amp;gt; [# &amp;lt;oneline&amp;gt;]
# .       create a merge commit using the original merge commit's
# .       message (or the oneline, if no original merge commit was
# .       specified). Use -c &amp;lt;commit&amp;gt; to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Squashing Begins❗️
&lt;/h3&gt;

&lt;p&gt;Now, press S and it goes into editing mode. Replace &lt;strong&gt;pick&lt;/strong&gt; as &lt;strong&gt;squash&lt;/strong&gt;, for the commits you need to squash.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pick d8c1963 Adding contents
squash 5e4ea01 added
squash a3e1b06 removed few content
squash f9d4b67 Added few contents
squash 9e69811 Fixed typos and added content
pick 42dbace final

# Rebase 5f5302b..42dbace onto f9d4b67 (6 commands)
#
# Commands:
# p, pick &amp;lt;commit&amp;gt; = use commit
# r, reword &amp;lt;commit&amp;gt; = use commit, but edit the commit message
# e, edit &amp;lt;commit&amp;gt; = use commit, but stop for amending
# s, squash &amp;lt;commit&amp;gt; = use commit, but meld into previous commit
# f, fixup &amp;lt;commit&amp;gt; = like "squash", but discard this commit's log message
# x, exec &amp;lt;command&amp;gt; = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop &amp;lt;commit&amp;gt; = remove commit
# l, label &amp;lt;label&amp;gt; = label current HEAD with a name
# t, reset &amp;lt;label&amp;gt; = reset HEAD to a label
# m, merge [-C &amp;lt;commit&amp;gt; | -c &amp;lt;commit&amp;gt;] &amp;lt;label&amp;gt; [# &amp;lt;oneline&amp;gt;]
# .       create a merge commit using the original merge commit's
# .       message (or the oneline, if no original merge commit was
# .       specified). Use -c &amp;lt;commit&amp;gt; to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
-- INSERT --
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;basically, all these 4 commits history is gonna be squashed into the previous one with a commit message which we are going to give in the next step. Always don't include &lt;strong&gt;squash&lt;/strong&gt; in the first commit(Well! in this case, "d8c1963"), probably it shoots an error.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now save the changes made by pressing Esc + : + w + q and after saving press shift + z two times, which brings you to an interface 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;# This is a combination of 5 commits.
# This is the 1st commit message:

Adding contents
# This is the commit message #2:

added
# This is the commit message #3:

removed few content
# This is the commit message #4:

Added few contents
# This is the commit message #5:

Fixed typos and added content

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date:      Fri Dec 4 12:14:48 2020 +0530
#
# interactive rebase in progress; onto 5f5302b
"~/Dev-test-repo/.git/COMMIT_EDITMSG" 33L, 839C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;here what it does is &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Processing 🔄
&lt;/h3&gt;

&lt;p&gt;Now it's our chance to delete the commit messages and create a new commit message&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;final test

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date:      Fri Dec 4 12:14:48 2020 +0530
#
# interactive rebase in progress; onto 5f5302b
# Last commands done (5 commands done):
#    squash f9d4b67 Added few contents
#    squash 9e69811 Fixed typos and added content
# Next command to do (1 remaining command):
#    pick 42dbace final
# You are currently rebasing branch 'main' on '5f5302b'.
#
# Changes to be committed:
#       modified:   README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again, press Esc + : + w + q and after saving press shift + z two times. Now you will be thrown out that environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Takeoff ✈️
&lt;/h3&gt;

&lt;p&gt;All these efforts should be reflected in our repo right!? So, let's push all those to our example repo in Github...&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 -f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;here, we use &lt;strong&gt;-f&lt;/strong&gt; since we're force pushing it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Finally 🎉
&lt;/h3&gt;

&lt;p&gt;We squashed multiple commits to a single one!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsa45089l0tuufo26hcm3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsa45089l0tuufo26hcm3.png" alt="Alt Text" width="800" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For Beginners, remember deleting a commit is different from squashing commits.&lt;/p&gt;

&lt;p&gt;Hope this article helps you!, Do like and share it if you find it useful. Post your valuable suggestions in the comments below!&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>git</category>
      <category>github</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Open a Pull Request in Github?</title>
      <dc:creator>Yeganathan S</dc:creator>
      <pubDate>Sun, 25 Oct 2020 03:12:07 +0000</pubDate>
      <link>https://forem.com/yeganathan/create-a-pull-request-in-github-2h8l</link>
      <guid>https://forem.com/yeganathan/create-a-pull-request-in-github-2h8l</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hello Everyone! I'm going to share my experience on creating a pull request in Github, Trust me that's easier than what we think.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's get started,&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Git should be installed.&lt;/li&gt;
&lt;li&gt;Basic knowledge of Git. &lt;/li&gt;
&lt;li&gt;Github account.&lt;/li&gt;
&lt;li&gt;Knowledge of terminal commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, we are going to add badge to the README.md file by pulling a request.&lt;/p&gt;

&lt;p&gt;Badges basically help in increasing the readability of the readme file. just like tags!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzi9f67j6r3twjn2sbqpr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzi9f67j6r3twjn2sbqpr.png" alt="Alt Text" width="800" height="193"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now the real part of git begins!😂 and let me break it down into steps...&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 1
&lt;/h4&gt;

&lt;p&gt;Fork the repository you need to pull a request. when we fork, we get a copy of that project in our Github profile.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 2
&lt;/h4&gt;

&lt;p&gt;Copy the Fork URL.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1yfkxnas6ibck5xta2r5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1yfkxnas6ibck5xta2r5.png" alt="Alt Text" width="800" height="641"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open up a terminal 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;$ git clone your-fork-url
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have the project locally,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz3le2uq4euavm9d9qg6a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz3le2uq4euavm9d9qg6a.png" alt="Alt Text" width="800" height="142"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 3
&lt;/h4&gt;

&lt;p&gt;Go to the project directory now!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd project-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8p6djss2o9irz3hhuthb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8p6djss2o9irz3hhuthb.png" alt="Alt Text" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 4
&lt;/h4&gt;

&lt;p&gt;Now check the issue of the repository which you forked, you will find something like this...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjqozr46p19qpk30ui204.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjqozr46p19qpk30ui204.png" alt="Alt Text" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 5
&lt;/h4&gt;

&lt;p&gt;Open the README.md file using an editor and add the badges that are mentioned in the issue.&lt;/p&gt;

&lt;p&gt;you can find the Markdown codes for badges &lt;a href="https://github.com/Naereen/badges.git" rel="noopener noreferrer"&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Forlgdruqjd0q814kdw1a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Forlgdruqjd0q814kdw1a.png" alt="Alt Text" width="800" height="147"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Save the README.md after editing.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 6
&lt;/h4&gt;

&lt;p&gt;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;$ git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can see there will be something like modified README.md in red color.&lt;/p&gt;

&lt;p&gt;We have a change in README.md file right!? so we need to save that change. In other words, we need to commit those changes that are made.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 7
&lt;/h4&gt;

&lt;p&gt;Open up and type the following...&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This command shows the changes made by us!&lt;/p&gt;

&lt;p&gt;Don't ask me why are we checking it again since we know what are all changes we made! as said before I'm taking you guys through a path...&lt;/p&gt;

&lt;p&gt;Just relax and continue reading!&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 8
&lt;/h4&gt;

&lt;p&gt;Most forgets the usage of all these commands including myself 🤦🏻‍♂️ &lt;br&gt;
let me explain this too,&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 README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This adds README.md file including your project.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git add file1 file2 file3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;When you are having many files.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&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;blockquote&gt;
&lt;p&gt;When you want to add all files.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The last command mentioned above is not a good practice though! what if you don't want a file after pushing it. Believe me, it really sucks! myself when I was new to git I use to delete the whole repository for this problem🙆🏻‍♂️😬&lt;/p&gt;

&lt;p&gt;Back to the path!&lt;/p&gt;

&lt;p&gt;We are going to use the first command mentioned in &lt;strong&gt;Step - 8&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 9
&lt;/h4&gt;

&lt;p&gt;Now again...&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This time you get modified: README.md but in green color! since we added the files, it changes from red to green.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The whole process is like packing chocolates for gift in the factory!&lt;/p&gt;

&lt;p&gt;Eww! that sounds a little weird I know but trust me! with a real-life example, you will understand it better than anything else.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 10
&lt;/h4&gt;

&lt;p&gt;Now type the following command in the terminal...&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 "Add the License badge to README.md"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Remember committing is like packing&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you pack, you add a note too! like bday wishes and this part should be sensible too right!? we don't write happy bday for an anniversary function, similarly, commit messages should be sensible.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 11
&lt;/h4&gt;

&lt;p&gt;Now again...&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;you will be probably getting the working tree clean &amp;amp; nothing to commit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This happens because we had change earlier but we committed it which means we saved a checkpoint for it.&lt;/p&gt;

&lt;p&gt;Type...&lt;br&gt;
&lt;/p&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;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feg0vglamdj18hfans7hp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feg0vglamdj18hfans7hp.png" alt="Alt Text" width="800" height="1131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see our commit in the log!&lt;/p&gt;

&lt;h4&gt;
  
  
  Step - 12
&lt;/h4&gt;

&lt;p&gt;Now we have to send the chocolate(we can eat it too!), for sending we need an address. Our code should finally go to the repository which we forked in the beginning but do we have access to that? No right!? so for sending it we need a delivery service. Let's say for example you forked a project from user "A" and now the forked one which has some changes is with you so in this instance you are "B". Now "A" is Europe and "B" is India so for sending the chocolates from India to Europe we need a delivery service which is our &lt;strong&gt;&lt;em&gt;Pull Request&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now type this 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 remote -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically, this shows fetch and push, try to remember like this...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;fetch - from where you want to fetch the commits&lt;br&gt;
push - where do you want to push the commits&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Step - 13
&lt;/h4&gt;

&lt;p&gt;We didn't push the commit yet right!? so let's push it...&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 -u origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now our file gets pushed into our Repo.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Basically push command pushes all the new commits to the Github repository.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let me conclude,&lt;/p&gt;

&lt;p&gt;snitch3s/hackbunch was the main project here and ours is a fork so initially, both are at the same level but you made a new commit recently so you are 1 commit ahead of the main project.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Remember: Only when there is a change (ahead/behind) you can make a Pull Request(PR)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;so your PR should go from your fork:master branch to snitches:master&lt;/p&gt;

&lt;p&gt;Now you can find something like compare or pull request basically both do the same...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhv86ob964337yq29z2j4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhv86ob964337yq29z2j4.png" alt="Alt Text" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pull a request and create one&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzh0knatv4cq6999a9865.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzh0knatv4cq6999a9865.png" alt="Alt Text" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above image shows something similar to git diff command which is nothing but one final check!&lt;/p&gt;

&lt;p&gt;Now it totally depends on the maintainer whether to accept the PR or not!&lt;/p&gt;

&lt;p&gt;Kudos to my mentor who taught all these stuffs &lt;a class="mentioned-user" href="https://dev.to/vchrombie"&gt;@vchrombie&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading my article and Comment down your feedback!😃&lt;/p&gt;

</description>
      <category>git</category>
      <category>beginners</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
