<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Debajit Mallick's Blog]]></title><description><![CDATA[A blog site where you find all my blogs.]]></description><link>https://debajit13blog.netlify.app</link><generator>GatsbyJS</generator><lastBuildDate>Sun, 29 Nov 2020 20:24:32 GMT</lastBuildDate><item><title><![CDATA[Deep Dive Into Git(Part II)]]></title><description><![CDATA[Before deep dive into git, firstly, we need to understand what is GitHub. So GitHub is a code hosting platform for collaboration and version…]]></description><link>https://debajit13blog.netlify.app/my-second-post/</link><guid isPermaLink="false">https://debajit13blog.netlify.app/my-second-post/</guid><pubDate>Sat, 17 Oct 2020 23:46:37 GMT</pubDate><content:encoded>&lt;p&gt;Before deep dive into git, firstly, we need to understand what is GitHub. So GitHub is a code hosting platform for collaboration and version control. There are many platforms same as GitHub like GitLab, Bitbucket etc.&lt;/p&gt;
&lt;p&gt;Before getting started, we need to install git. To install git just go to the &lt;a href=&quot;https://git-scm.com/downloads&quot;&gt;link&lt;/a&gt; and download git for your system. If you are using windows then you have to install git bash. If you are using Linux or Mac then the default terminal is fine for you. After that, you need to go to &lt;a href=&quot;https://github.com/&quot;&gt;GitHub&lt;/a&gt; and create an account. In this article, we are mainly focusing on git commands. Now we can start our journey with basic git commands.&lt;/p&gt;
&lt;p&gt;First, we need to understand some of the words that are often used in git.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;repository: A git repository is a .git folder inside a folder.&lt;/li&gt;
&lt;li&gt;sha/hash: It is a hexadecimal number which is used to identify different commits.&lt;/li&gt;
&lt;li&gt;directory: It is same as a folder. But when we navigate through terminal we use the term directory.&lt;/li&gt;
&lt;li&gt;master/ main: It is the name of the default branch in git.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now, just open git bash if you are in Windows and terminal if you are in Mac or Linux. Every git command started with git keyword. So to check that git is installed properly in your system just run the following command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git — version&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/333/1*Y-VZAtal28cu5lQQH4FNUw.png&quot; alt=&quot;git version check&quot;&gt;&lt;/p&gt;
&lt;p&gt;It will show you the version of git you installed in your system. After that, you have to configure your name and mail at git bash. To do that run the command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git config — global user.name “your name”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;git config — global user.email “your email”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/700/1*TYepG31WSj7Nb0NGSOpnzA.png&quot; alt=&quot;git name and mail config&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now you are ready to go. First, you have to create a directory. To create a directory using terminal use the following command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;mkdir folder-name&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To enter inside a directory write the following command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cd folder-name&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/307/1*pn6Oz-Stx-WNZR99_S2qsA.png&quot; alt=&quot;create and enter directory&quot;&gt;&lt;/p&gt;
&lt;p&gt;After entering into the directory, now you have to initialize git to access all the features of it. use the following command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git init&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/636/1*CLb2qYTtBZaWxW8tBpQcpw.png&quot; alt=&quot;git init&quot;&gt;&lt;/p&gt;
&lt;p&gt;It initializes an empty git repository. So now if you turn on hidden files and folder, you can find a .git folder inside that folder. Or you can use&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ls -a&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;command and you can find one .git folder inside it. It is the place where git controls all of its features.&lt;/p&gt;
&lt;p&gt;Now you have to insert some contents inside the directory. So just open that directory in your favourite editor(Ex: VScode, Atom, Sublime etc.) and write some codes inside it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/700/1*CMQBFYE9RkLRx5i7s0jkdA.png&quot; alt=&quot;write some code&quot;&gt;&lt;/p&gt;
&lt;p&gt;After saving all the files. Now you need to stage all the changes inside the files. Because now the files are inside the directory but version control does not work now. Only the last saved version was shown now. To stage all the changes use:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git add file-name (to stage changes only inside that particular file) or,&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;git add . (to stage all changes inside the current directory)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/418/1*kwcG-eaMQLcEp1xwqipH8g.png&quot; alt=&quot;git add filename&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now after staging all the files or changes inside the project you need to commit those changes. If you don’t commit those changes then only the last version is saved. To commit all the changes that you made use the following command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git commit -m “commit message”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/713/1*5IZBGBsL3M2pk4fd8FyHVQ.png&quot; alt=&quot;git commit -m message&quot;&gt;&lt;/p&gt;
&lt;p&gt;You can also add and commit both at the same time by using the command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git commit -a -m “commit message”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;After committing all the changes a sha or hash is generated for that particular commit. Now if you made some more changes then you can compare those changes with any committed versions by using the command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git diff sha-of-one-commit sha-of-another-commit -p&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/746/1*8tWSCjKx9qcnS5MlQwEi6A.png&quot; alt=&quot;git diff&quot;&gt;&lt;/p&gt;
&lt;p&gt;One of the most helpful git command is status. It gives you all the information about the current situation of your repository.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git status&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/856/1*yPA_EJqQdalfsp8_wliQfw.png&quot; alt=&quot;git status&quot;&gt;&lt;/p&gt;
&lt;h3&gt;What is HEAD?&lt;/h3&gt;
&lt;p&gt;HEAD is a pointer which always points to the last committed version. So you can also use the HEAD in your commands. Ex:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git diff HEAD HEAD~1 -p&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/576/1*u57RpLNNoGuwMFppk0JyCA.png&quot; alt=&quot;HEAD example&quot;&gt;&lt;/p&gt;
&lt;p&gt;To list all the commits details use the following command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git log&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/855/1*zqaSdGRktbkixgsmFXw7tg.png&quot; alt=&quot;git log&quot;&gt;&lt;/p&gt;
&lt;p&gt;Another useful command is show command. It is like a merge of git diff and git log. By using show you get all the details of a particular commit like author, date and so much more.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git show sha-of-the-commit&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/671/1*EVeT7xq1hJHppyRXoY_-qg.png&quot; alt=&quot;git show&quot;&gt;&lt;/p&gt;
&lt;p&gt;To see the commits in a particular file use:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git annotate file-name&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/875/1*o5muOgHT18mqSr95U0eNOg.png&quot; alt=&quot;git annotate filname&quot;&gt;&lt;/p&gt;
&lt;p&gt;If you are using VScode then you can also you an extension named as git lens to get the same output in VScode.&lt;/p&gt;
&lt;p&gt;Now if make some changes but not add them to go back to the last committed version use:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git checkout — filename&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/659/1*0lztOUGP62lCoODs6ixBBw.png&quot; alt=&quot;git checkout -- filename&quot;&gt;&lt;/p&gt;
&lt;p&gt;If you add those changes and now want to go back, just use reset command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git reset HEAD filename&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/658/1*FO7GbIoCetr2N0zB-OZ9oQ.png&quot; alt=&quot;git reset HEAD filename&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now if you run the checkout command it takes you to the last committed version.&lt;/p&gt;
&lt;p&gt;If you are in a stage when you commit those changes and find that you are doing
something wrong then just go to a previous version write&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git checkout sha-of-the-commit-you-want-to-go file-name&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/755/1*DcJ4fYnF5nnIMZqzWrVqeg.png&quot; alt=&quot;git checkout sha-of-where-you-want-to-go filename&quot;&gt;&lt;/p&gt;
&lt;p&gt;These are the basic commands of git. After learning about all these commands you are ready to go with GitHub and other complex commands of git. Just check out any cheatsheet of git for learning more.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Hack Club SIT - My Journey]]></title><description><![CDATA[Introduction to Hack Club: It is an incident from the previous year (2019), One day I was going through my emails and I found one email from…]]></description><link>https://debajit13blog.netlify.app/new-beginnings/</link><guid isPermaLink="false">https://debajit13blog.netlify.app/new-beginnings/</guid><pubDate>Wed, 14 Oct 2020 22:12:03 GMT</pubDate><content:encoded>&lt;img src=&quot;https://indiablog.hackclub.com/content/articles/hacksitmyjourney/img/poster.jpg&quot; width=&quot;632px&quot; height=&quot;332px&quot;&gt;
&lt;h3&gt;Introduction to Hack Club:&lt;/h3&gt;
&lt;p&gt;It is an incident from the previous year (2019), One day I was going through my emails and I found one email from GitHub. When I scrolled through the email there was a link to a post about Hack Club. I didn’t know anything about the Hack Club. Then I read about it and was motivated to apply as a lead. So filled that form and it took about 2 hours to fill that form.&lt;/p&gt;
&lt;p&gt;Then I took two of my friends Nilavya Das and Ishan Bagchi as the Co-lead. I was very nervous as I have never been a leader of any group before and if my application was rejected then it that too would be very painful for me.&lt;/p&gt;
&lt;p&gt;But my luck shined and I got one email from Hack Club that said they have selected my proposal and now there would be one interview round. I was scared as I didn’t have any experience of giving an interview. But as the interviewer was very friendly and helpful so it went great for me.&lt;/p&gt;
&lt;p&gt;He asked me some questions about my ideas and how I would teach other members and after giving answers he told me that I have to organize our first meetup.&lt;/p&gt;
&lt;h3&gt;First events - Open Source and GitHub:&lt;/h3&gt;
&lt;p&gt;Now, we were going to conduct our first meetup. In the first session, I told everyone about the Hack Club and its mission. After that, I took one session on Git and GitHub. As it was my first event I was a little bit nervous but in the end, all the things went well!&lt;/p&gt;
&lt;img src=&quot;https://indiablog.hackclub.com/content/articles/hacksitmyjourney/img/meet1.jpg&quot; width=&quot;632px&quot; height=&quot;332px&quot;&gt;
&lt;p&gt;After that, we met another day for GitHub and Open Source again. This time I was fully ready to take that the event and teach all the basic topics and open source concepts. This time we were going blazing fast and all the members were very eager to learn and build projects.&lt;/p&gt;
&lt;img src=&quot;https://indiablog.hackclub.com/content/articles/hacksitmyjourney/img/meet2.jpeg&quot; width=&quot;632px&quot; height=&quot;332px&quot;&gt;
&lt;h3&gt;The Pandemic Story&lt;/h3&gt;
&lt;p&gt;We had many plans to execute after the first two events, but then the pandemic happened and we were unable to execute any of our plans. Other groups and people were affected by the pandemic, our Hack Club SIT was no exception to that. We lost all our connections with other members. The group was in very bad condition. No members were active and we also didn’t have anything to do at that time. At that point, I thought that club might not sustain.&lt;/p&gt;
&lt;h3&gt;We made it through!&lt;/h3&gt;
&lt;p&gt;After some months at the end of August, I and my co-leads had one idea. We thought to take a one-month long competition on open-source contribution.&lt;/p&gt;
&lt;p&gt;We then started with the execution of our plans. We made and collectively took some projects from people and told the creators to make some issues in their projects. After that, all the 27 contributors started to make their contribution. Some of them made decent contributions and we gave them some stickers. This event was pretty long but well-executed.&lt;/p&gt;
&lt;p&gt;At that point in time, we thought maybe if we take online sessions we can also create a better impact.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://indiablog.hackclub.com/content/articles/hacksitmyjourney/img/gameon.png&quot; alt=&quot;event poster&quot;&gt;&lt;/p&gt;
&lt;h3&gt;New Beginnings&lt;/h3&gt;
&lt;p&gt;Some days later, my juniors came to me and told me that they were going to be active and they wanted to learn and improve their skills. I was so happy to see their eagerness to learn and make something good. So we made one core team to plan our events and other tasks.&lt;/p&gt;
&lt;p&gt;Then we found that many students didn’t know what were the different things in computer science engineering. So we took one event with 6 speakers( specialists in different fields) about what is engineering and what are the different parts of it. In this event, we talk about web development, app development, artificial intelligence, cybersecurity, and competitive programming.&lt;/p&gt;
&lt;p&gt;As Hack Club gave us Zoom pro. We were using it to take this event. We got an amazing response from the attendees. We also have one youtube channel. Where we teach and organising amazing events.&lt;/p&gt;
&lt;p&gt;You can follow Hack Club SIT and join our slack group also. Links are provided below&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/channel/UCUNKlsGUtcwAclmyatjo1ow&quot;&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twitter.com/hackclubsit&quot;&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.linkedin.com/company/hackclubsit&quot;&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://app.slack.com/client/TRP9V4N9X/CRN3E5CF5&quot;&gt;Slack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/Hack-Club-SIT&quot;&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Deep Dive Into Git(Part I)]]></title><description><![CDATA[Git is a distributed version control system. Now we are going to understand what is the meaning of each word in this definition. Before that…]]></description><link>https://debajit13blog.netlify.app/hello-world/</link><guid isPermaLink="false">https://debajit13blog.netlify.app/hello-world/</guid><pubDate>Tue, 07 Jul 2020 22:40:32 GMT</pubDate><content:encoded>&lt;p&gt;Git is a distributed version control system. Now we are going to understand what is the meaning of each word in this definition.&lt;/p&gt;
&lt;p&gt;Before that, there are two things that you need to know. They are client and server. So the client is the computer which you use like your PC and server is a big computer which provides or takes the data from the client. It is not the proper definition of client and server. But for the seek of understanding Git you can also think it like this.&lt;/p&gt;
&lt;p&gt;There are two types of systems:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Centralized System&lt;/li&gt;
&lt;li&gt;Distributed System&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/700/1*sk12XX2YQUVAinZnpRZUTw.png&quot; alt=&quot;centralized system&quot;&gt;&lt;/p&gt;
&lt;p&gt;In Centralized systems, there is a central server and other client machines are connected with it. Let us take an example, in a company some developers write codes in their computers and at the end of the day they send all their code to the server. This kind of systems are great but also have some problems. Just if somehow the server fails then all the code have vanished and all hard work they have done just gone forever. That is the primary cause of why Distributed systems came into the picture.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/700/1*t5Zf0lQtXAggNXz5NtQXFw.png&quot; alt=&quot;distributed system&quot;&gt;&lt;/p&gt;
&lt;p&gt;In Distributed systems, there is a central server and clients are connected with it just like the Centralized system, but the main difference in this system is all the client machines have their copy of the code that they wrote previously. So if the server crashed they have all the code in their computers. For that, they do not face too much loss like a Centralized system. Git system based on this distributed approach, so we always have a local copy of the code.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/max/700/1*ERQU99MvNvEKpT8jaLAegQ.png&quot; alt=&quot;before and after learning git&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now the other term is called version control, what is it? Before understanding that let us consider a situation where you have a project and you don’t know anything about version control. Then first you create a project and named it “Project”. Some days later you add or delete some code and renamed it to “Final Project”. After some days you again change some code and renamed it “Final Final Project” and this process goes on. Now if you want to go to a particular version of your project, it’s not easy for you to go and find a project folder where you have certain features or deleted some of them. It is not practical at all.&lt;/p&gt;
&lt;p&gt;So what Git does is it creates a version for your project and change it after some changes you have made in that project. So now you have created a project that is initially at v1.0. After some change, turns into v1.1 and so on. Now if you want, it just takes your one command to go back from v10.9 to v1.9 or vice versa using Git. So now your project is much easier to manage.&lt;/p&gt;
&lt;p&gt;So why version control or Git is so much important? Firstly, it helps you to keep track of the changes you have made in a project over time. Secondly, It gives you the ability to go back to a particular version. Most importantly, You can easily contribute to someone else’s work.&lt;/p&gt;</content:encoded></item></channel></rss>