{"id":2678,"date":"2020-07-17T13:50:55","date_gmt":"2020-07-17T08:20:55","guid":{"rendered":"https:\/\/lgconsultancy.wpcomstaging.com\/?p=2678"},"modified":"2022-07-29T07:20:31","modified_gmt":"2022-07-29T07:20:31","slug":"git-advanced-tips-tricks","status":"publish","type":"post","link":"https:\/\/lng-consultancy.com\/staging\/5474\/git-advanced-tips-tricks\/","title":{"rendered":"Git &#8211; Advanced tips &#038; tricks"},"content":{"rendered":"<p>Git is amazing and you\u2019ll learn only by using it. Like in any other version control system, in git, you commit files, review the history of changes, maybe even create a merge branch. Git is more powerful than any other version control system. Here, you will learn how to take advantage of Git\u2019s advanced, and therefore lesser-known, features to help you improve your daily workflow.<\/p>\n<h2><\/h2>\n<h2><strong>The Tools<\/strong><\/h2>\n<p>I\u2019ll be using Git entirely from the command line. If you feel more comfortable using a graphical user interface, you can certainly run one alongside the command line as you follow along. However, I highly recommend that you make the command line your primary tool when using Git. Why? Because GUIs, regardless of how well they are designed, always impose some kind of limitation on what you can and can\u2019t do with Git. It doesn\u2019t mean that you\u2019ll have to sacrifice user-friendliness. There are a few utilities designed specifically to make Git easier to use from the command line eg. Posh Git for Powershell, Oh-my-zsh for Z shell. A quick hack for Git bash is adding this to <strong>~\/.bashrc<\/strong><\/p>\n<blockquote><p>parse_git_branch() {<br \/>\ngit branch 2> \/dev\/null | sed -e \u2018\/^[^*]\/d\u2019 -e \u2018s\/* \\(.*\\)\/(\\1)\/\u2019<br \/>\n}<\/p>\n<p>export PS1=\u201d\\u@\\h \\[\\e[32m\\]\\w \\[\\e[91m\\]\\$(parse_git_branch)\\[\\e[00m\\]$\u201d<\/p><\/blockquote>\n<h2><\/h2>\n<h2><strong>Aliases<\/strong><\/h2>\n<p>Sometimes even with autocompletion on you just can\u2019t seem to type fast enough. For those situations, having short aliases for the most common git commands can be quite handy. Defining an alias is easy. You simply say:<\/p>\n<blockquote><p>git config \u2013global \u2013add alias.st status<\/p>\n<p>git config alias.ch checkout<\/p><\/blockquote>\n<h2><\/h2>\n<h2><strong>Merging vs Rebase<\/strong><\/h2>\n<p>Git is all about working with divergent history. Its <strong>git merge<\/strong> and <strong>git rebase<\/strong> commands offer alternative ways to integrate commits from different branches, and both options come with their own advantages.<\/p>\n<p>Consider what happens when you start working on a new feature in a dedicated branch, then another team member updates the <em>master<\/em> branch with new commits. This results in a forked history, which should be familiar to anyone who has used Git as a collaboration tool.<\/p>\n<p><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" class=\" size-full wp-image-2682 aligncenter\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2020\/07\/1.png?resize=483%2C322&ssl=1\" alt=\"1\" width=\"483\" height=\"322\"><\/p>\n<p>Now, let\u2019s say that the new commits in <em>master<\/em> are relevant to the feature that you\u2019re working on. To incorporate the new commits into your <em>feature<\/em> branch, you have two options: merging or rebasing.<\/p>\n<p><strong>The merge option<\/strong><\/p>\n<p>The easiest option is to merge the <em>master<\/em> branch into the feature branch using something like the following:<\/p>\n<blockquote><p>git checkout feature<\/p>\n<p>git merge master<\/p><\/blockquote>\n<p>This creates a new \u201cmerge commit\u201d in the feature branch that ties together the histories of both branches, giving you a branch structure that looks like this:<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\" size-full wp-image-2683 aligncenter\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2020\/07\/3.png?resize=557%2C320&ssl=1\" alt=\"3\" width=\"557\" height=\"320\"><\/p>\n<p><strong>The Rebase Option<\/strong><\/p>\n<p>As an alternative to merging, you can rebase the <em>feature<\/em> branch onto\u00a0<em>master<\/em>\u00a0branch using the following commands:<\/p>\n<blockquote><p>git checkout feature<\/p>\n<p>git rebase master<\/p><\/blockquote>\n<p>This moves the entire feature branch to begin on the tip of the master branch, effectively incorporating all of the new commits in master. But, instead of using a merge commit, rebasing re-writes the project history by creating brand new commits for each commit in the original branch.<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\" size-full wp-image-2686 aligncenter\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2020\/07\/4.png?resize=627%2C316&ssl=1\" alt=\"4\" width=\"627\" height=\"316\"><\/p>\n<p>The major benefit of rebasing is that you get a much cleaner project history. First, it eliminates the unnecessary merge commits required by git merge. Second, as you can see in the above diagram, rebasing also results in a perfectly linear project history\u2014you can follow the tip of feature all the way to the beginning of the project without any forks.<\/p>\n<h3><em>The golden rule of rebasing is to never use it on public branches<\/em><\/h3>\n<h2><\/h2>\n<h2><strong>Pretty History<\/strong><\/h2>\n<p>Since history is something we\u2019ll be wanting to look at all the time every tiny bit of improvement that we can make is worth the effort. By periodically performing an interactive rebase, you can make sure each commit in your feature branch is focused and meaningful. This lets you write your code without worrying about breaking it up into isolated commits\u2014you can fix it up after the fact. For example, the following command begins an interactive rebase of only the last 3 commits.<\/p>\n<blockquote><p>git checkout feature<\/p>\n<p>git rebase -i HEAD~3<\/p><\/blockquote>\n<p>By specifying <strong>HEAD~3<\/strong> as the new base, you\u2019re not actually moving the branch\u2014you\u2019re just interactively re-writing the 3 commits that follow it.<\/p>\n<p><em>Note:<\/em> This will not incorporate upstream changes into the feature branch.<\/p>\n<h2><strong>Force-pushing<\/strong><\/h2>\n<p>If you try to push the rebased <em>feature<\/em> branch back to a remote repository, Git will prevent you from doing so because it conflicts with the remote\u00a0<em>feature<\/em>\u00a0branch. But, you can force the push to go through by passing the\u00a0<em>\u2013force<\/em> flag, like so:<\/p>\n<blockquote><p>git push \u2013force<\/p><\/blockquote>\n<p>This overwrites the remote <em>feature<\/em> branch to match the rebased one from your repository and makes things very confusing for the rest of your team. So, be very careful to use this command only when you know exactly what you\u2019re doing.<\/p>\n<h2><strong>Reset Head<\/strong><\/h2>\n<p>Resetting is a way to move the tip of a branch to a different commit. This can be used to remove commits from the current branch. For example, the following command moves the <em>hotfix<\/em> branch backward by two commits.<\/p>\n<blockquote><p>git checkout hotfix<\/p>\n<p>git reset HEAD~2<\/p><\/blockquote>\n<p>The two commits that were on the end of <em>hotfix<\/em>\u00a0are now dangling, or orphaned commits. This means they will be deleted the next time Git performs a garbage collection. It can be visualized as:<\/p>\n<p style=\"text-align: center;\"><em>Before Resetting<\/em><\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-2688 aligncenter\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2020\/07\/5.png?resize=504%2C317&ssl=1\" alt=\"5\" width=\"504\" height=\"317\"><\/p>\n<p style=\"text-align: center;\"><em>After Resetting<\/em><\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2689 aligncenter\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2020\/07\/6.png?resize=505%2C307&ssl=1\" alt=\"6\" width=\"505\" height=\"307\"><\/p>\n<p>In addition to moving the current branch, you can also get\u00a0<code>git reset<\/code>\u00a0to alter the staged snapshot and\/or the working directory by passing it one of the following flags:<\/p>\n<ul>\n<li><em>\u2013soft <\/em>\u2013 The staged snapshot and working directory are not altered in any way.<\/li>\n<li><em>\u2013mixed <\/em>\u2013 The staged snapshot is updated to match the specified commit, but the working directory is not affected. This is the default option.<\/li>\n<li><em>\u2013hard <\/em>\u2013 The staged snapshot and the working directory are both updated to match the specified commit.<\/li>\n<\/ul>\n<h2>Reverting a specific commit<\/h2>\n<p style=\"text-align: left;\">Reverting undoes a commit by creating a new commit. This is a safe way to undo changes, as it has no chance of re-writing the commit history. For example, the following command will figure out the changes contained in the 2nd to the last commit, create a new commit undoing those changes, and tack the new commit onto the existing project.<\/p>\n<blockquote><p>git checkout hotfix<\/p>\n<p>git revert HEAD~2<\/p><\/blockquote>\n<p style=\"text-align: center;\">This can be visualized as the following:<\/p>\n<p style=\"text-align: center;\"><em>Before Reverting<\/em><\/p>\n<p style=\"text-align: center;\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-2692 aligncenter\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2020\/07\/7png.png?resize=495%2C308&ssl=1\" alt=\"7,png\" width=\"495\" height=\"308\"><\/p>\n<p style=\"text-align: center;\"><em>After Reverting<\/em><\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2693 aligncenter\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2020\/07\/8.png?resize=566%2C311&ssl=1\" alt=\"8\" width=\"566\" height=\"311\"><\/p>\n<p>Contrast this with <em>git reset<\/em>\u00a0which\u00a0<em>does<\/em> alter the existing commit history. For this reason,\u00a0<em>git revert<\/em> should be used to undo changes on a public branch, and\u00a0<em>git reset <\/em>should be reserved for undoing changes on a private branch.<\/p>\n<p>You can also think of\u00a0<em>git revert<\/em> as a tool for undoing\u00a0<em>committed<\/em> changes, while <em>git reset HEAD<\/em>\u00a0is for undoing\u00a0<em>uncommitted<\/em> changes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Git is amazing and you\u2019ll learn only by using it. Like in any other version control system, in git, you commit files, review the history of changes, maybe even create a merge branch. Git is more powerful than any other version control system. Here, you will learn how to take advantage of Git\u2019s advanced, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7305,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"nf_dc_page":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[32],"tags":[],"class_list":["post-2678","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Git - Advanced tips &amp; tricks - L&amp;G Consultancy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git - Advanced tips &amp; tricks - L&amp;G Consultancy\" \/>\n<meta property=\"og:description\" content=\"Git is amazing and you\u2019ll learn only by using it. Like in any other version control system, in git, you commit files, review the history of changes, maybe even create a merge branch. Git is more powerful than any other version control system. Here, you will learn how to take advantage of Git\u2019s advanced, and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/\" \/>\n<meta property=\"og:site_name\" content=\"L&amp;G Consultancy\" \/>\n<meta property=\"article:author\" content=\"#\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-17T08:20:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-29T07:20:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/landg-consultancy.com\/wp-content\/uploads\/2020\/07\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"aarti.sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"aarti.sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/\"},\"author\":{\"name\":\"aarti.sharma\",\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#\\\/schema\\\/person\\\/749b02afec4ef158d834f42b20317e7d\"},\"headline\":\"Git &#8211; Advanced tips &#038; tricks\",\"datePublished\":\"2020-07-17T08:20:55+00:00\",\"dateModified\":\"2022-07-29T07:20:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/\"},\"wordCount\":1143,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/lng-consultancy.com\\\/staging\\\/5474\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/\",\"url\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/\",\"name\":\"Git - Advanced tips & tricks - L&amp;G Consultancy\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/lng-consultancy.com\\\/staging\\\/5474\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1\",\"datePublished\":\"2020-07-17T08:20:55+00:00\",\"dateModified\":\"2022-07-29T07:20:31+00:00\",\"author\":{\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#\\\/schema\\\/person\\\/749b02afec4ef158d834f42b20317e7d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/lng-consultancy.com\\\/staging\\\/5474\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/lng-consultancy.com\\\/staging\\\/5474\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1\",\"width\":1200,\"height\":628},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/git-advanced-tips-tricks\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/lng-consultancy.com\\\/staging\\\/5474\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Git &#8211; Advanced tips &#038; tricks\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#website\",\"url\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/\",\"name\":\"L&amp;G Consultancy\",\"description\":\"Your Technology Partner\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#\\\/schema\\\/person\\\/749b02afec4ef158d834f42b20317e7d\",\"name\":\"aarti.sharma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4bc152d6e52aec6debc7aee0c5707a6ab8f84f6168eec5d3644910d6c18d8d94?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4bc152d6e52aec6debc7aee0c5707a6ab8f84f6168eec5d3644910d6c18d8d94?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4bc152d6e52aec6debc7aee0c5707a6ab8f84f6168eec5d3644910d6c18d8d94?s=96&d=mm&r=g\",\"caption\":\"aarti.sharma\"},\"description\":\"Share a little biographical information to fill out your profile. This may be shown publicly.\",\"sameAs\":[\"#\"],\"url\":\"https:\\\/\\\/lng-consultancy.com\\\/staging\\\/5474\\\/author\\\/aarti-sharma\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Git - Advanced tips & tricks - L&amp;G Consultancy","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:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/","og_locale":"en_US","og_type":"article","og_title":"Git - Advanced tips & tricks - L&amp;G Consultancy","og_description":"Git is amazing and you\u2019ll learn only by using it. Like in any other version control system, in git, you commit files, review the history of changes, maybe even create a merge branch. Git is more powerful than any other version control system. Here, you will learn how to take advantage of Git\u2019s advanced, and [&hellip;]","og_url":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/","og_site_name":"L&amp;G Consultancy","article_author":"#","article_published_time":"2020-07-17T08:20:55+00:00","article_modified_time":"2022-07-29T07:20:31+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/i0.wp.com\/landg-consultancy.com\/wp-content\/uploads\/2020\/07\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1","type":"image\/jpeg"}],"author":"aarti.sharma","twitter_card":"summary_large_image","twitter_misc":{"Written by":"aarti.sharma","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/#article","isPartOf":{"@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/"},"author":{"name":"aarti.sharma","@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#\/schema\/person\/749b02afec4ef158d834f42b20317e7d"},"headline":"Git &#8211; Advanced tips &#038; tricks","datePublished":"2020-07-17T08:20:55+00:00","dateModified":"2022-07-29T07:20:31+00:00","mainEntityOfPage":{"@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/"},"wordCount":1143,"commentCount":0,"image":{"@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2020\/07\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1","articleSection":["Software Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/","url":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/","name":"Git - Advanced tips & tricks - L&amp;G Consultancy","isPartOf":{"@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#website"},"primaryImageOfPage":{"@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/#primaryimage"},"image":{"@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2020\/07\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1","datePublished":"2020-07-17T08:20:55+00:00","dateModified":"2022-07-29T07:20:31+00:00","author":{"@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#\/schema\/person\/749b02afec4ef158d834f42b20317e7d"},"breadcrumb":{"@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/#primaryimage","url":"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2020\/07\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1","contentUrl":"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2020\/07\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1","width":1200,"height":628},{"@type":"BreadcrumbList","@id":"https:\/\/landg-consultancy.com\/git-advanced-tips-tricks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lng-consultancy.com\/staging\/5474\/"},{"@type":"ListItem","position":2,"name":"Git &#8211; Advanced tips &#038; tricks"}]},{"@type":"WebSite","@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#website","url":"http:\/\/sh024.global.temp.domains\/~landgcon\/","name":"L&amp;G Consultancy","description":"Your Technology Partner","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/sh024.global.temp.domains\/~landgcon\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#\/schema\/person\/749b02afec4ef158d834f42b20317e7d","name":"aarti.sharma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4bc152d6e52aec6debc7aee0c5707a6ab8f84f6168eec5d3644910d6c18d8d94?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4bc152d6e52aec6debc7aee0c5707a6ab8f84f6168eec5d3644910d6c18d8d94?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4bc152d6e52aec6debc7aee0c5707a6ab8f84f6168eec5d3644910d6c18d8d94?s=96&d=mm&r=g","caption":"aarti.sharma"},"description":"Share a little biographical information to fill out your profile. This may be shown publicly.","sameAs":["#"],"url":"https:\/\/lng-consultancy.com\/staging\/5474\/author\/aarti-sharma\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2020\/07\/Untitled-design-27.jpg?fit=1200%2C628&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts\/2678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/comments?post=2678"}],"version-history":[{"count":1,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts\/2678\/revisions"}],"predecessor-version":[{"id":7306,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts\/2678\/revisions\/7306"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/media\/7305"}],"wp:attachment":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/media?parent=2678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/categories?post=2678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/tags?post=2678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}