<?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: Pratham Tyagi</title>
    <description>The latest articles on DEV Community by Pratham Tyagi (@prvthvm).</description>
    <link>https://dev.to/prvthvm</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%2F1253496%2Fc8e6e8ee-c398-4a96-9103-e7521cf529bb.jpeg</url>
      <title>DEV Community: Pratham Tyagi</title>
      <link>https://dev.to/prvthvm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prvthvm"/>
    <language>en</language>
    <item>
      <title>✨2024 Resolution: Be more Open-Source centric</title>
      <dc:creator>Pratham Tyagi</dc:creator>
      <pubDate>Tue, 16 Jan 2024 11:54:01 +0000</pubDate>
      <link>https://dev.to/prvthvm/2024-resolution-be-more-open-source-centric-p35</link>
      <guid>https://dev.to/prvthvm/2024-resolution-be-more-open-source-centric-p35</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;TL;DR&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Why rely on proprietary software and services when there is (almost) always an open-source alternative that can do the job just as well, if not better?&lt;br&gt;
Here are 10 open-source alternatives I’ve been using, covering everything from project management and communication to data analytics.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FsIeAc0i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/myr16piv7vezdjomgt4i.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FsIeAc0i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/myr16piv7vezdjomgt4i.gif" alt="Developer, Open-Source, Meme, Tech Memes, The Office" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;1- &lt;a href="//cal.com"&gt;Cal.com&lt;/a&gt; instead of Calendly&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Calendly was a game-changer for simplifying scheduling, but Cal.com managed to bring it to the next level. This open-source gem has features like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Team scheduling&lt;/li&gt;
&lt;li&gt;Integrated video conferencing&lt;/li&gt;
&lt;li&gt;Automatic time zone detection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u04Mb8tX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j27kgtmc27sktmp1p8fv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u04Mb8tX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j27kgtmc27sktmp1p8fv.gif" alt="cal.com, open-source, GitHub, fun, Calendly, money" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;3- &lt;a href="https://plausible.io/"&gt;Plausible&lt;/a&gt; instead of Google Analytics&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Sure, Google Analytics is a big name, but sometimes smaller tools offer just as much, and a great example is Plausible.&lt;br&gt;
This open-source tool provides website analytics features just like Google, and no, they don’t compromise on data privacy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--57tsbvUG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3z6lutb7bl9wj9x7mk70.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--57tsbvUG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3z6lutb7bl9wj9x7mk70.gif" alt="Plausible, google, Google Analytics, privacy, court-case, security, graphs" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;4- &lt;a href="//appflowy.io"&gt;AppFlowy&lt;/a&gt; instead of Notion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Notion is an excellent workspace for anything about note-taking and project management but if you want an even more straightforward option, try AppFlowy.&lt;br&gt;
This tool offers a minimalist alternative, focusing on simply creating and organizing lists, notes, and tasks.&lt;br&gt;
The interface is very user-friendly; you’ll be a pro in no time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gmhFlNI9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0xxne4rh2qtoxg25m21.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gmhFlNI9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0xxne4rh2qtoxg25m21.gif" alt="Notion, writing, blogs, appflowy, open-source, free" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;5- &lt;a href="https://penpot.app/"&gt;Penpot&lt;/a&gt; instead of Figma&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Figma is a design powerhouse, but its open-source cousin, Penpot, has been gaining momentum over the last year.&lt;/p&gt;

&lt;p&gt;Here are Penpot’s key features:&lt;/p&gt;

&lt;p&gt;Collaborative design capabilities&lt;br&gt;
Vector editing&lt;br&gt;
Interactive prototypes&lt;br&gt;
Cost-effectiveness&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8xG-GtKC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pkg8ayeuw0y1q0tme50t.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8xG-GtKC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pkg8ayeuw0y1q0tme50t.gif" alt="PenPot, Figma, write,free" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;6- &lt;a href="https://fonoster.com/"&gt;Fonoster&lt;/a&gt; instead of Twilio&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Twilio is a communication platform that provides APIs for SMS, voice, video, and authentication and offers a seamless customer experience.&lt;br&gt;
Let me introduce you to Fonoster, the cost-effective alternative. Fonoster provides a similar offer with voice and messaging services. Fonoster focuses on scalability while giving you a seamless customer experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H7RLnT-o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1jk20ziqppgcpbfr6e37.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H7RLnT-o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1jk20ziqppgcpbfr6e37.gif" alt="Fonoster, Twilio, API, chat, free,customer, messaging platform, scalable" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;7- &lt;a href="https://nextcloud.com/"&gt;NextCloud&lt;/a&gt; instead of Dropbox&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;NextCloud is the open-source rival to Dropbox.&lt;br&gt;
It offers file hosting, collaboration, and synchronization features, all while keeping your data private and under your control.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R3gETRrC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szichu2pjf9xzah9v64y.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R3gETRrC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szichu2pjf9xzah9v64y.gif" alt="NextCloud, Cloud, free" width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;8- &lt;a href="https://jitsi.org/"&gt;Jitsi&lt;/a&gt; instead of Google Meets&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Jitsi is the alternative to Google Meets, offering similar video conferencing capabilities.&lt;/p&gt;

&lt;p&gt;Their key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;End-to-end encryption&lt;/li&gt;
&lt;li&gt;Screen sharing&lt;/li&gt;
&lt;li&gt;And no registration is required!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6MLr9cVm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xwnxa8hy6a0svqb4yo1d.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6MLr9cVm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xwnxa8hy6a0svqb4yo1d.gif" alt="Screen, Jitsi, Google Meet, Video Conferencing, free, open-source" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;9- &lt;a href="https://padloc.app/"&gt;Padloc&lt;/a&gt; vs 1Password&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;1Password is well-established in the password management landscape, but Padloc, an open-source tool, focuses on privacy and security just as much.&lt;br&gt;
You can securely store and manage your sensitive and private information securely with Padloc, just like 1Password.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DnMkLcnJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4st8nymwlf3wlslz029k.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DnMkLcnJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4st8nymwlf3wlslz029k.gif" alt="Padloc, Passwords, Password Manager, management, tools, secure, privacy" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;10- &lt;a href="//crowd.dev"&gt;Crowd.dev&lt;/a&gt; instead of Common Room&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Common Room has been gaining momentum in the community building landscape, but don’t overlook their open-source alternative, "crowd.dev".&lt;br&gt;
Whether it’s project management, funding, or collaboration, "crowd. dev" can’t be overlooked to build and develop online communities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g_c6Ui9i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9j3mxkbk6wuwyt2g1fdh.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g_c6Ui9i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9j3mxkbk6wuwyt2g1fdh.gif" alt="Crowd.dev, project management, funding, collaboration, build" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When choosing a tool, remember to check out the open-source option.&lt;br&gt;
Open source brings transparency, customizability, and cost-effectiveness to the equation, making a good choice in most cases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--emkBXOde--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rvimkpxsq91d6m1jfei1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--emkBXOde--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rvimkpxsq91d6m1jfei1.gif" alt="Old woman, conclusion, spinning, ugly, That's all folks" width="500" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Congratulations, you made it to the end! Don't hesitate if you have any questions.&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>devresolutions2024</category>
      <category>programming</category>
      <category>opensource</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Developer's Cheat Sheet: 10 Game-Changing Git Commands 🚀</title>
      <dc:creator>Pratham Tyagi</dc:creator>
      <pubDate>Wed, 10 Jan 2024 15:23:45 +0000</pubDate>
      <link>https://dev.to/prvthvm/developers-cheat-sheet-10-game-changing-git-commands-4f6o</link>
      <guid>https://dev.to/prvthvm/developers-cheat-sheet-10-game-changing-git-commands-4f6o</guid>
      <description>&lt;p&gt;Understanding Git and GitHub is crucial for any developer, providing effective version control and code management. Proficiency in these tools sets you apart and enhances your productivity. In this blog post, we will explore a set of Git commands to kickstart your journey into software development.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Git Vocabulary&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before delving into the commands, let's acquaint ourselves with some Git terminologies. This understanding will not only help you grasp Git better but also provide a foundation for your overall comprehension.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt;&lt;br&gt;
A repository, or repo, serves as a storage space where your project's source code and its version history are stored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Working Directory&lt;/strong&gt;&lt;br&gt;
The working directory is where you currently make changes to your project, housing the files you are actively working on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Staging&lt;/strong&gt;&lt;br&gt;
Staging acts as an intermediate area between the repository and your working directory. It's where you add changes before committing them to the main repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commit&lt;/strong&gt;&lt;br&gt;
A commit is a snapshot of proposed changes to the stage, identified by a unique identifier (SHA-1 hash) and accompanied by a commit message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Branch&lt;/strong&gt;&lt;br&gt;
A branch represents a parallel version of your repository, facilitating work on different features or bug fixes independently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Merge&lt;/strong&gt;&lt;br&gt;
Merging involves combining proposed changes into the main repository, often utilized to integrate new features into the main project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pull&lt;/strong&gt;&lt;br&gt;
Pulling refers to fetching code from any remote repository and merging it into your local repository, i.e., working directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Push&lt;/strong&gt;&lt;br&gt;
Pushing involves sending your local changes to any remote branch of any repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clone&lt;/strong&gt;&lt;br&gt;
Cloning is the process of creating a local copy of the main repository and establishing a connection for efficient pull and push.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fetch&lt;/strong&gt;&lt;br&gt;
Fetching downloads changes from any remote repository to the local repository, without directly merging them into your local repository. It is useful for reviewing changes before merging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fork&lt;/strong&gt;&lt;br&gt;
Forking creates a personal copy of someone else's repository on your GitHub account, enabling changes without affecting the original repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conflict&lt;/strong&gt;&lt;br&gt;
A conflict arises when two or more branches have changes in the same part of the code, and Git cannot directly merge them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Head&lt;/strong&gt;&lt;br&gt;
In Git, HEAD is a pointer/reference always pointing to your latest commit in the current branch. When you make a new commit, HEAD moves to the top of your commit.&lt;/p&gt;

&lt;p&gt;Now, let's explore the 10 Git commands one by one.&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%2Fres.cloudinary.com%2Fpracticaldev%2Fimage%2Ffetch%2Fs--BPy2SPgp--%2Fc_limit%252Cf_auto%252Cfl_progressive%252Cq_66%252Cw_800%2Fhttps%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs5zias7tsgsdjokp5g9p.gif" 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%2Fres.cloudinary.com%2Fpracticaldev%2Fimage%2Ffetch%2Fs--BPy2SPgp--%2Fc_limit%252Cf_auto%252Cfl_progressive%252Cq_66%252Cw_800%2Fhttps%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs5zias7tsgsdjokp5g9p.gif" alt="This GIF marks the beginning of the breakdown of all the pointers mentioned above, tags- git, github, commands, beginner, coding, blockchain, react, javascript, funny, memes. coding meme"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;1 - Adding and Committing Files Together&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Traditionally, in Git, we use the &lt;code&gt;git add *&lt;/code&gt; command to stage all modified files for a subsequent commit. Subsequently, we use the git &lt;code&gt;commit -m "commitMessage"&lt;/code&gt; command to commit these changes. However, a more streamlined command exists, achieving both tasks in a single step:&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 -am "commitMessage"

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

&lt;/div&gt;



&lt;p&gt;The -am flag allows us to stage these changes and commit them in one efficient operation`&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2 - Creating and Switching to a Git Branch&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Similar to the previous scenario, another command combines the functionality of two commands. Instead of using separate commands, use &lt;code&gt;git branch branchName&lt;/code&gt; to create a branch and &lt;code&gt;git checkout branchName&lt;/code&gt; to switch to it. Achieve both tasks in a single step with the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git checkout -b branchName&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-b&lt;/code&gt; flag with the &lt;code&gt;git checkout&lt;/code&gt; command allows us to create a new branch and immediately switch to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3 - Delete a Git Branch&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To delete a branch in Git, use the &lt;code&gt;git branch -d&lt;/code&gt; or &lt;code&gt;git branch -D&lt;/code&gt; command. The &lt;code&gt;-d&lt;/code&gt; option is for a safe deletion, only deleting the branch if fully merged into the current branch. The &lt;code&gt;-D&lt;/code&gt; option is for forceful deletion, regardless of whether it's fully merged. Here are the commands:&lt;/p&gt;

&lt;p&gt;Safe deletion (checks for merge):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git branch -d branchName&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
Forceful deletion (doesn’t check for merge):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git branch -D branchName&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4 - Renaming a Git Branch&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To rename a branch, use the &lt;code&gt;git branch -m&lt;/code&gt; command followed by the current branch name and the new desired branch name. For example, to rename a branch called &lt;code&gt;oldBranch&lt;/code&gt; to &lt;code&gt;newBranch&lt;/code&gt;, run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git branch -m oldBranch newBranch&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you want to rename the current branch where you are working, without specifying the old name, use the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git branch -m newBranchName&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here, you don’t need to specify the old branch name because Git will assume you want to rename the current branch to the new name.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;5 - Unstaging a Specific File&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Occasionally, you may want to remove a particular file from the staging area, allowing additional modifications before committing. Use:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git reset filename&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
This will un-stage that file while keeping your changes intact.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;6 - Discarding Changes to a Specific File&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To completely discard changes made to a specific file and revert it to its last committed state, use:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git checkout -- filename&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
This command ensures the file returns to its previous state, undoing recent modifications. It’s a helpful way to start fresh on a particular file without affecting the rest of your changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;7 - Updating Your Last Git Commit&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Imagine you’ve just made a commit in your Git repository, but then you realize that you forgot to include a change in that commit, or perhaps you want to fix the commit message itself. You don’t want to create a whole new commit for this small change. Instead, you want to add it to the previous commit. This is where you can use the command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git commit --amend -m 'message'&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
This command modifies the most recent commit you made, combining any staged changes with your new comment to create an updated commit.&lt;/p&gt;

&lt;p&gt;A thing to remember is that if you have already pushed the commit to a remote repository, you will need to force push the changes using git &lt;code&gt;push --force&lt;/code&gt; to update the remote branch. A standard git push operation appends a new commit to your remote repository rather than modifying the last commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;8 - Stashing Changes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Imagine you’re working on two different branches, A and B. While making changes in branch A, your team asks you to fix a bug in branch B. When you attempt to switch to branch B using &lt;code&gt;git checkout B&lt;/code&gt;, Git prevents it, displaying an error:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83cudgwe96d3fiannzoc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83cudgwe96d3fiannzoc.png" alt="This is an Git error, displayed after we mess up, oops :("&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can commit our changes as suggested by the error message. But committing is&lt;/p&gt;

&lt;p&gt;more like a fixed point in time, not an ongoing work in progress. This is where we can apply the error message’s second suggestion and use the stash feature. Use this command for stashing your changes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git stash&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git stash&lt;/code&gt; temporarily saves changes that you're not ready to commit, allowing you to switch branches or work on other tasks without committing incomplete work.&lt;/p&gt;

&lt;p&gt;To reapply stashed changes in your branch, use &lt;code&gt;git stash apply&lt;/code&gt; or &lt;code&gt;git stash pop&lt;/code&gt;. Both commands restore the latest stashed changes. Stash applying simply restores the changes, while popping restores the changes and removes them from the stash. You can read more about stashing &lt;a href="https://opensource.com/article/21/4/git-stash" rel="noopener noreferrer"&gt;over here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;9 - Reverting Git Commits&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Imagine you’re working on a Git project, and you discover that a particular commit introduced some undesirable changes. You need to reverse those changes without erasing the commit from history. Use the following command to undo that particular commit:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git revert commitHash&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
It’s a safe and non-destructive way to correct errors or unwanted alterations in your project.&lt;/p&gt;

&lt;p&gt;For instance, let’s say you have a series of commits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commit A&lt;/li&gt;
&lt;li&gt;Commit B (undesirable changes introduced here)&lt;/li&gt;
&lt;li&gt;Commit C&lt;/li&gt;
&lt;li&gt;Commit D
To reverse the effects of Commit B, run:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git revert commitHashOfB&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Git will create a new commit, let’s call it Commit E, which negates the changes introduced by Commit B. Commit E becomes the latest commit in your branch, and the project now reflects the state it would have been in if Commit B had never happened.&lt;/p&gt;

&lt;p&gt;If you’re wondering how to retrieve a commit hash, it’s straightforward using &lt;code&gt;git reflog&lt;/code&gt;. In the screenshot below, the highlighted portions represent the commit hashes that you can easily copy:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdh19vkj3srwcg9fcujuf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdh19vkj3srwcg9fcujuf.png" alt="Commit Hashes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;10 - Resetting Git Commits&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let’s assume you’ve made a commit to your project. However, upon inspection, you realize that you need to adjust or completely undo your last commit. For such a scenario, Git provides these powerful commands:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Soft reset&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git reset --soft HEAD^&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;When you use &lt;code&gt;git reset --soft HEAD^&lt;/code&gt;, you are performing a soft reset. This command allows you to backtrack on your last commit while preserving all your changes in the staging area. In simple words, you can easily uncommit while retaining your code changes, using this command. It is handy when you need to revise the last commit, perhaps to add more changes before committing again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mixed reset&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git reset --mixed HEAD^&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is the default behavior when you use &lt;code&gt;git reset HEAD^&lt;/code&gt; without specifying &lt;code&gt;--soft&lt;/code&gt; or &lt;code&gt;--hard&lt;/code&gt;. It un-commits the last commit and removes its changes from the staging area. However, it keeps these changes in your working directory. It is helpful when you want to un-commit the last commit and make changes from scratch while keeping the changes in your working directory before re-committing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hard reset&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;git reset --hard HEAD^&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, let’s talk about &lt;code&gt;git reset --hard HEAD^&lt;/code&gt;. It completely erases the last commit along with all the associated changes from your Git history. When you use &lt;code&gt;--hard&lt;/code&gt; flag, there's no going back. So use this with extreme caution when you want to discard the last commit and all its changes permanently.&lt;/p&gt;

&lt;p&gt;Thank you so much for reading. This is my first blog on &lt;a href="//dev.to/prvthvm"&gt;dev.to&lt;/a&gt;. I hope this post is helpful, and that you learned some new commands. If you have any further questions, don’t hesitate to reach out. Feel free to share any Git commands you tend to use in your daily routine and find super handy. :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect with me:-
&lt;/h2&gt;

&lt;p&gt;&lt;a href="//twitter.com/prvthvm"&gt;Twitter&lt;/a&gt;&lt;br&gt;
&lt;a href="//linkedin.com/in/tyagii"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
