<?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: Avinash Reddy Arutla</title>
    <description>The latest articles on DEV Community by Avinash Reddy Arutla (@burpcat).</description>
    <link>https://dev.to/burpcat</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F673525%2F27f3ad50-e1f7-4c84-b7e9-8e4c0448a446.png</url>
      <title>DEV Community: Avinash Reddy Arutla</title>
      <link>https://dev.to/burpcat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/burpcat"/>
    <language>en</language>
    <item>
      <title>Getting started with Git</title>
      <dc:creator>Avinash Reddy Arutla</dc:creator>
      <pubDate>Thu, 28 Apr 2022 10:00:45 +0000</pubDate>
      <link>https://dev.to/burpcat/getting-started-with-git-5pi</link>
      <guid>https://dev.to/burpcat/getting-started-with-git-5pi</guid>
      <description>&lt;p&gt;&lt;strong&gt;Pre-requisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic Linux commands&lt;/li&gt;
&lt;li&gt;Able to navigate directories using terminal &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So what is Git?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Git is a DVCS that stores the data in a filesystem made up of snapshots. These snapshots are created when the commit command is used.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is a DVCS?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Version Control snapshots the present code along with the changes when committed. These snapshots can later be retrieved in case any errors creep in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In Distributed Version Control System, the same snapshots created by the Version control, are distributed among the authenticated users. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the need arises to merge everything to a single codebase, these snapshots can be merged fast and effortlessly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fi.ytimg.com%2Fvi%2FBdoaiCdqE64%2Fmaxresdefault.jpg" 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%2Fi.ytimg.com%2Fvi%2FBdoaiCdqE64%2Fmaxresdefault.jpg" alt="Happy minions"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Git??
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Git, natively is a set of command line utility programs that are designed to execute on Unix based Operating Systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There are various other implementations of GIT as GUI, but the the full functionality of GIT is only through the CLI.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installing Git
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Linux/Unix users
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Open your terminal, and install &lt;a href="https://brew.sh" rel="noopener noreferrer"&gt;Homebrew&lt;/a&gt; with the following command&lt;/li&gt;
&lt;/ul&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%2F5ic2ry493600y53dnzbu.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%2F5ic2ry493600y53dnzbu.png" alt="Homebrew installation Command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now install Git&lt;/li&gt;
&lt;/ul&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%2Fg4guhciacy2s9tfv9hba.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%2Fg4guhciacy2s9tfv9hba.png" alt="Install Git - Homebrew"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Windows users
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to &lt;a href="https://git-scm.com/download/win" rel="noopener noreferrer"&gt;Git Downloads&lt;/a&gt;, download the portable or the executable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After the installation is complete, open Git Bash.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;From now on, it's the same for both platforms.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;h3&gt;
  
  
  Working with Git on a CLI
&lt;/h3&gt;



&lt;ul&gt;
&lt;li&gt;Executing &lt;code&gt;git&lt;/code&gt; will list out all the available git commands which can be permutated accordingly.
&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%2Fw6n2ctm4h0go6ugjn7on.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  git init
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Initialising a Git repository&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Now, let us tell Git who we are

&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%2Ftbij4wd8gv3j223du7t0.png" alt="Git Config details"&gt;
&lt;/li&gt;
&lt;li&gt;Here,&lt;code&gt;Avinash&lt;/code&gt; and &lt;code&gt;avinasharutla@gmail.com&lt;/code&gt; you can place your name and email address. These parameters are used in commit history, and we will understand about commits further.

&lt;/li&gt;
&lt;/ul&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%2Fikt29ysihgghetz8k5oj.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%2Fikt29ysihgghetz8k5oj.png" alt="Git Config list"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The above command will list all the globally defined parameters in Git.&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;Now lets initialise a git repository&lt;/li&gt;
&lt;li&gt;I chose a folder named &lt;code&gt;git_chicha&lt;/code&gt; for creating a git repository.
&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%2Fksey0a8qefz7eo969tz0.png" alt="Git init"&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;Ohh, was that a mistake, now we'll remove git from the folder&lt;/li&gt;
&lt;/ul&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%2Fy07r3jzrfz3ods35kz5m.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%2Fy07r3jzrfz3ods35kz5m.png" alt="Git remove"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;ul&gt;
&lt;li&gt;Now, we'll will create a file inside the git repository&lt;/li&gt;
&lt;/ul&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%2Fn1m5gmmu97611daq4f8i.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%2Fn1m5gmmu97611daq4f8i.png" alt="First file creation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We can use a text editor or vim for the editing of the file.&lt;/li&gt;
&lt;/ul&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%2Fjcvs58mnz6t2j3vwatfc.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%2Fjcvs58mnz6t2j3vwatfc.png" alt="first file in vim"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, after we enter the information in the file, lets stage it.&lt;/li&gt;
&lt;li&gt;When a particular file is staged, Git makes the file ready for committing into the Git timeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  git add
&lt;/h4&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%2F4yum8eryxiu7qjq28z9o.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%2F4yum8eryxiu7qjq28z9o.png" alt="Git add"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, lets check the status of the git repository
&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%2Flvix9pb4sno8ggkhyeak.png" alt="Git status"&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;h4&gt;
  
  
  git commit
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;After the file is staged, we need to commit the file into the Git timeline&lt;/li&gt;
&lt;li&gt;Committing is like taking a snapshot of the staged files with all the changes made.&lt;/li&gt;
&lt;li&gt;The command is as follows&lt;/li&gt;
&lt;/ul&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%2F4y6wwa3jkshbjeorxdn9.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%2F4y6wwa3jkshbjeorxdn9.png" alt="git commit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When the above command is used, vim editor is opened&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%2F381di3o2xkoykrw9m8j3.png" alt="Image description"&gt;
.
&amp;nbsp; &amp;nbsp; &lt;strong&gt;I&lt;/strong&gt; -&amp;gt; insert mode
&amp;nbsp; &amp;nbsp; &lt;strong&gt;:wq&lt;/strong&gt; -&amp;gt; exit vim&lt;/li&gt;
&lt;/ul&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%2Fts7nsqy8r6pw6pcp91fh.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%2Fts7nsqy8r6pw6pcp91fh.png" alt="Commit in vim"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We can also use the

&lt;code&gt;git commit -m "commit message"&lt;/code&gt;

to skip using vim.&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;So let's consider a case where you pushed a commit which is bad for the pipeline. In this case, we need to revert the commit.&lt;/li&gt;
&lt;/ul&gt;



&lt;h4&gt;
  
  
  git log
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Let us use the &lt;code&gt;git log&lt;/code&gt; command to list all the previous commits inside the repo.&lt;/li&gt;
&lt;/ul&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%2Fo67nm703acjkdo2nb8dd.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%2Fo67nm703acjkdo2nb8dd.png" alt="git log"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;br&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%2F14y963drtjy9jrrw1vg3.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%2F14y963drtjy9jrrw1vg3.png" alt="git log realtime"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the above screenshot, one can see all the metadata about the commit, like the name and username. This data was entered through the &lt;code&gt;git config --global&lt;/code&gt; command.&lt;/li&gt;
&lt;/ul&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%2Fzygxkk3ebh0zf0ula4pf.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%2Fzygxkk3ebh0zf0ula4pf.png" alt="git revert screen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Following is the screen when we reverted to the original commit.&lt;/li&gt;
&lt;/ul&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%2Fbz60lfpclnre699b5q7k.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%2Fbz60lfpclnre699b5q7k.png" alt="git revert vim"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Its amazing how version control works right?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now, lets connect this offline repository to a online one. &lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For demonstration, here I'll be using GitHub.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Configuring Remote Repository
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Let's first Visit &lt;a href="https://wwws.github.com" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now, let's Sign in. I have an account, Also take a look at &lt;a href="https://education.github.com/pack" rel="noopener noreferrer"&gt;GitHub Student Developer Pack&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After signing in, on the leftmost part of the screen, let's click on the &lt;strong&gt;New&lt;/strong&gt; button.&lt;br&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%2F65xkm088m84wn9ezuhjj.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%2F65xkm088m84wn9ezuhjj.png" alt="GitHub first image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now, let's choose a repo name which is catchy and relevant&lt;br&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%2F19kzrybpfmlpn26emm7s.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%2F19kzrybpfmlpn26emm7s.png" alt="New Repo"&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now, head over to the end of the page, and click on "&lt;strong&gt;Create Repository&lt;/strong&gt;".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After the creation of the repository, we can add files through browser upload or we can use Git for pushing the files.&lt;br&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%2Fkh6r61ixucx9fdz9gnll.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%2Fkh6r61ixucx9fdz9gnll.png" alt="Git repo created"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lets use git here.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Using Git to upload files to origin
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Let's head over to the terminal, and type the following command
&lt;code&gt;git remote add origin https://github.com/burpcat/git_chicha.git&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&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%2F5mrbrlxqh3jn8nke99qu.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%2F5mrbrlxqh3jn8nke99qu.png" alt="git remote add origin"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now to see the linked remote repo's to your local repo, we can use the command&lt;/li&gt;
&lt;/ul&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%2F179e5py91s7woayn3rgs.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%2F179e5py91s7woayn3rgs.png" alt="git remote list carbon"&gt;&lt;/a&gt;&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%2Fnm5w76nbi62du150puqs.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%2Fnm5w76nbi62du150puqs.png" alt="git remote list terminal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now since everything like commits are wrapped up at our local repository, we hence put forth the legendary command!&lt;/li&gt;
&lt;/ul&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%2Fvmn06ithqti07vbxhuof.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%2Fvmn06ithqti07vbxhuof.png" alt="GPOM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Note : Here if you can use your own &lt;a href="https://github.com/settings/tokens" rel="noopener noreferrer"&gt;Personal Token&lt;/a&gt; to access Git, or sign in if that option exists&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Note : The default branch name vary from user to user, some use master, some may use main, some may use default. You could refer this &lt;a href="https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/changing-the-default-branch" rel="noopener noreferrer"&gt;article&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After the command is used, this is how our GitHub Repo looks like.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2For8sxfxgfg2vfb2m2uax.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%2For8sxfxgfg2vfb2m2uax.png" alt="GitHub repo page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are Git Branches again, which I will discuss in an another article.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
