{"id":384608,"date":"2023-09-20T11:01:37","date_gmt":"2023-09-20T11:01:37","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=384608"},"modified":"2023-09-20T11:01:45","modified_gmt":"2023-09-20T11:01:45","slug":"git-basics-usage-and-techniques","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/","title":{"rendered":"Git: Basics usage and techniques"},"content":{"rendered":"\n<p>In the previous Git blog, we learned <a href=\"https:\/\/webkul.com\/blog\/how-to-install-and-configure-git\/\">how to install git and configure<\/a>, we will learn git basic usage and techniques to use git commands and explore these techniques.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Clone and Initializing the repository<\/li>\n\n\n\n<li>Pull<\/li>\n\n\n\n<li>Push<\/li>\n\n\n\n<li>Status ( to check the commit changes )<\/li>\n\n\n\n<li>Commit<\/li>\n\n\n\n<li>Commit history<\/li>\n\n\n\n<li>Compare commits<\/li>\n<\/ul>\n\n\n\n<p><strong>What is a clone and how does Initializing a repository?<\/strong><\/p>\n\n\n\n<p>A clone is a term commonly used in version control systems, such as Git, to refer to the process of creating a local copy of a remote repository.<\/p>\n\n\n\n<p>When you clone a repository, you create a copy of the entire repository&#8217;s history, including all branches, commits, and files. This local copy allows you to work on the project, make changes, and synchronize with the remote repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Git repository initialize<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\">git init<\/pre>\n\n\n\n<p><strong>Exploring &#8220;Git Pull&#8221;: Understanding its functionality and operation.<\/strong><\/p>\n\n\n\n<p>In Git, &#8220;pull&#8221; is a command used to fetch the latest changes from a remote repository and incorporate them into the current local branch. It combines two operations: fetching and merging.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git pull<\/pre>\n\n\n\n<p>Git performs the following actions when you execute the &#8220;pull&#8221; command:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It fetches the latest commits and changes from the remote repository.<\/li>\n\n\n\n<li>It identifies the changes that are not present in the local branch.<\/li>\n\n\n\n<li>It merges those changes into the current branch, creating a new merge commit if necessary.<\/li>\n<\/ul>\n\n\n\n<p>If you want to pull changes from a different branch.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git pull origin &lt;branch&gt;<\/pre>\n\n\n\n<p><strong>NOTE:<\/strong>  &#8220;pull&#8221; command should be used with caution, especially if you have uncommitted changes in your local branch. It&#8217;s recommended to commit or stash your changes before pulling to avoid conflicts or potential loss of work.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Push command and How does it work?<\/h3>\n\n\n\n<p>In Git, &#8220;push&#8221; is a command used to upload your local commits and changes to a remote repository. It allows you to share your work with others or update a central repository with your local changes.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git push<\/pre>\n\n\n\n<p><strong>NOTE:<\/strong> you should ensure that you have pulled the latest changes from the remote repository using the &#8220;pull&#8221; command. This helps avoid conflicts and ensures that you have the most up-to-date version of the branch before pushing your changes.<\/p>\n\n\n\n<p>If you want to push to a different location or branch than the default upstream<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git push origin &lt;branch&gt;<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"364\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-1200x364.png\" alt=\"push\" class=\"wp-image-392533\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-1200x364.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-300x91.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-250x76.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-768x233.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-1536x467.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push.png 1857w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Difference between Commit &amp; Commit history?<\/h3>\n\n\n\n<p><strong>Commits<\/strong> are snapshots of your entire repository at specific points in time. It is recommended to make new commits frequently, focusing on logical units of change. Over time, the commits should narrate the history of your repository and explain how it evolved to its current state. <\/p>\n\n\n\n<p>In addition to the contents and message, commits also include valuable metadata such as the author, timestamp, and more.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git commit -m &quot;update the README.md with link to contributing guide&quot;<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"181\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/commit-1200x181.png\" alt=\"commit\" class=\"wp-image-392532\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/commit-1200x181.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/commit-300x45.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/commit-250x38.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/commit-768x116.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/commit-1536x232.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/commit.png 1865w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>Commit history<\/strong> refers to the chronological sequence of commits in a version control system, such as Git. It provides a comprehensive record of all the changes made to a project over time, allowing developers to track and understand the project&#8217;s evolution.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git log<\/pre>\n\n\n\n<p>This command displays the commit history in reverse chronological order. It shows the commit hash, author, date, and commit message for each commit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"646\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-1200x646.png\" alt=\"git log\" class=\"wp-image-392493\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-1200x646.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-300x161.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-250x135.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-768x413.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-1536x827.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log.png 1856w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>If you want to list logs from a different branch.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git log &lt;branch&gt;<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"645\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-branch_-1200x645.png\" alt=\"git log branch\" class=\"wp-image-392494\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-branch_-1200x645.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-branch_-300x161.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-branch_-250x134.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-branch_-768x413.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-branch_-1536x826.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-log-branch_.png 1860w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\">git show &lt;commit-hash&gt;<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"647\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-show-1200x647.png\" alt=\"git show\" class=\"wp-image-392491\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-show-1200x647.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-show-300x162.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-show-250x135.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-show-768x414.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-show-1536x828.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-show.png 1863w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>This command shows the details of a specific commit, including the changes made in that commit.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Git Status and How does it work?<\/h3>\n\n\n\n<p>In Git, <code>git status<\/code> is a command used to display the current state of the repository and the changes made to files. It provides information about modified, staged, and untracked files, as well as the branch being worked on.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1041\" height=\"266\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/change-log-update.png\" alt=\"git change log update\" class=\"wp-image-392486\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/change-log-update.png 1041w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/change-log-update-300x77.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/change-log-update-250x64.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/change-log-update-768x196.png 768w\" sizes=\"(max-width: 1041px) 100vw, 1041px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\">git status<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"286\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-status-command-1-1200x286.png\" alt=\"git status command\" class=\"wp-image-392489\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-status-command-1-1200x286.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-status-command-1-300x72.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-status-command-1-250x60.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-status-command-1-768x183.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-status-command-1.png 1212w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Using the &#8220;git status&#8221; command you can quickly get an overview of the state of your repository and the changes you&#8217;ve made. It helps you track which files are modified, what changes are staged, and which files are not being tracked.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Compare commits and How does it work?<\/h3>\n\n\n\n<p>Git allows you to view and analyze the differences between two commits. It helps you understand the changes made, identify introduced bugs, track progress, and review modifications in the codebase.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Specifying Commits<\/li>\n\n\n\n<li>Viewing Differences<\/li>\n\n\n\n<li>Unified Diff Format<\/li>\n\n\n\n<li>Detailed Change Analysis<\/li>\n\n\n\n<li>Context and Patching<\/li>\n\n\n\n<li>Visualizing Differences<\/li>\n<\/ul>\n\n\n\n<p>In the above command, replace <code>commit1<\/code> and <code>commit2<\/code> with the actual commit hashes, branch names, or other references that represent the commits you want to compare.<\/p>\n\n\n\n<p>For example, to compare the differences between the current commit and the previous commit, you can use:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git diff commit1 commit2<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-diff-1200x365.png\" alt=\"git diff\" class=\"wp-image-392481\" style=\"width:821px;height:249px\" width=\"821\" height=\"249\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-diff-1200x365.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-diff-300x91.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-diff-250x76.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-diff-768x233.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-diff-1536x467.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/git-diff.png 1859w\" sizes=\"(max-width: 821px) 100vw, 821px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>This command compares the changes between the current commit (HEAD) and its parent commit (HEAD^).<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git diff HEAD HEAD^<\/pre>\n\n\n\n<p>This command compares the changes between the specified commits on their respective branches.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">git diff staging\/abc123 master\/def456<\/pre>\n\n\n\n<p>By using the <code>git diff<\/code> command with appropriate commit references, you can analyze and understand the differences between commits in your Git repository.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"654\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/branch-diff-1200x654.png\" alt=\"branch-diff\" class=\"wp-image-392529\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/branch-diff-1200x654.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/branch-diff-300x163.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/branch-diff-250x136.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/branch-diff-768x418.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/branch-diff-1536x837.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/branch-diff.png 1845w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In the previous Git blog, we learned how to install git and configure, we will learn git basic usage and techniques to use git commands and explore these techniques. What is a clone and how does Initializing a repository? A clone is a term commonly used in version control systems, such as Git, to refer <a href=\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":530,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1496,305],"tags":[1737,7767],"class_list":["post-384608","post","type-post","status-publish","format-standard","hentry","category-cs-cart","category-opencart","tag-git","tag-github"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Git: Basics usage and techniques - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Easily master Git version control with this comprehensive guide. Learn fundamentals, Git basics, usage, and essential techniques.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git: Basics usage and techniques - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Easily master Git version control with this comprehensive guide. Learn fundamentals, Git basics, usage, and essential techniques.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-20T11:01:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-20T11:01:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-1200x364.png\" \/>\n<meta name=\"author\" content=\"Yash Gupta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yash Gupta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/\"},\"author\":{\"name\":\"Yash Gupta\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c34caa3f4c420c0d8438a50b087ebae\"},\"headline\":\"Git: Basics usage and techniques\",\"datePublished\":\"2023-09-20T11:01:37+00:00\",\"dateModified\":\"2023-09-20T11:01:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/\"},\"wordCount\":750,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-1200x364.png\",\"keywords\":[\"GIT\",\"Github\"],\"articleSection\":[\"Cs Cart\",\"opencart\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/\",\"url\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/\",\"name\":\"Git: Basics usage and techniques - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-1200x364.png\",\"datePublished\":\"2023-09-20T11:01:37+00:00\",\"dateModified\":\"2023-09-20T11:01:45+00:00\",\"description\":\"Easily master Git version control with this comprehensive guide. Learn fundamentals, Git basics, usage, and essential techniques.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push.png\",\"width\":1857,\"height\":564,\"caption\":\"push\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Git: Basics usage and techniques\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c34caa3f4c420c0d8438a50b087ebae\",\"name\":\"Yash Gupta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f40fe01c9ce421fdc497c9d9b886fdc92e4a8c64b7703708c68717d22db539d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f40fe01c9ce421fdc497c9d9b886fdc92e4a8c64b7703708c68717d22db539d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Yash Gupta\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/yashgupta-wp766\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Git: Basics usage and techniques - Webkul Blog","description":"Easily master Git version control with this comprehensive guide. Learn fundamentals, Git basics, usage, and essential techniques.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/","og_locale":"en_US","og_type":"article","og_title":"Git: Basics usage and techniques - Webkul Blog","og_description":"Easily master Git version control with this comprehensive guide. Learn fundamentals, Git basics, usage, and essential techniques.","og_url":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-09-20T11:01:37+00:00","article_modified_time":"2023-09-20T11:01:45+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-1200x364.png","type":"","width":"","height":""}],"author":"Yash Gupta","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Yash Gupta","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/"},"author":{"name":"Yash Gupta","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c34caa3f4c420c0d8438a50b087ebae"},"headline":"Git: Basics usage and techniques","datePublished":"2023-09-20T11:01:37+00:00","dateModified":"2023-09-20T11:01:45+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/"},"wordCount":750,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-1200x364.png","keywords":["GIT","Github"],"articleSection":["Cs Cart","opencart"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/","url":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/","name":"Git: Basics usage and techniques - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push-1200x364.png","datePublished":"2023-09-20T11:01:37+00:00","dateModified":"2023-09-20T11:01:45+00:00","description":"Easily master Git version control with this comprehensive guide. Learn fundamentals, Git basics, usage, and essential techniques.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/push.png","width":1857,"height":564,"caption":"push"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/git-basics-usage-and-techniques\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Git: Basics usage and techniques"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c34caa3f4c420c0d8438a50b087ebae","name":"Yash Gupta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f40fe01c9ce421fdc497c9d9b886fdc92e4a8c64b7703708c68717d22db539d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f40fe01c9ce421fdc497c9d9b886fdc92e4a8c64b7703708c68717d22db539d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Yash Gupta"},"url":"https:\/\/webkul.com\/blog\/author\/yashgupta-wp766\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/384608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/530"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=384608"}],"version-history":[{"count":48,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/384608\/revisions"}],"predecessor-version":[{"id":398052,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/384608\/revisions\/398052"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=384608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=384608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=384608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}