{"id":281,"date":"2019-01-14T11:26:29","date_gmt":"2019-01-14T11:26:29","guid":{"rendered":"http:\/\/provisdemo.com\/provistechnologies\/?p=281"},"modified":"2024-08-26T14:21:51","modified_gmt":"2024-08-26T08:51:51","slug":"useful-git-commands","status":"publish","type":"post","link":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/","title":{"rendered":"Useful Git Commands"},"content":{"rendered":"\n<p>Useful Git Commands<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Create New Branch and Switch to Branch<\/h5>\n\n\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">git checkout -b branch_name<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Clean Cache for Untracked Files&nbsp;<\/h5>\n\n\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ngit rm -r --cached .\ngit add .\ngit commit -m &quot;fixed untracked files&quot;\n<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Clean All Untracked Directories&nbsp;<\/h5>\n\n\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">git clean -f -d<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Clean All Untracked Files&nbsp;<\/h5>\n\n\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">git clean -f<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Stage All Deleted Files&nbsp;<\/h5>\n\n\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">git ls-files --deleted -z | xargs -0 git rm<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Useful Git Commands Create New Branch and Switch to Branch Clean Cache for Untracked Files&nbsp; Clean All Untracked Directories&nbsp; Clean<\/p>\n","protected":false},"author":1,"featured_media":1438,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-281","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-git"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Top Useful Git Commands for Developers | Provis Technologies<\/title>\n<meta name=\"description\" content=\"Discover essential Git commands every developer should know. Simplify your workflow with these powerful Git tips and tricks.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Top Useful Git Commands for Developers | Provis Technologies\" \/>\n<meta property=\"og:description\" content=\"Discover essential Git commands every developer should know. Simplify your workflow with these powerful Git tips and tricks.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"Provis Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/Provis-Technologies\/124371854408675\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-14T11:26:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-26T08:51:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/provistechnologies.com\/blog\/wp-content\/uploads\/2020\/05\/Git-1024x483-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"834\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Anish Ojha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ProvisTech\" \/>\n<meta name=\"twitter:site\" content=\"@ProvisTech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anish Ojha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/\"},\"author\":{\"name\":\"Anish Ojha\",\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/#\\\/schema\\\/person\\\/476889d2aba4771446a8939b510fbbfa\"},\"headline\":\"Useful Git Commands\",\"datePublished\":\"2019-01-14T11:26:29+00:00\",\"dateModified\":\"2024-08-26T08:51:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/\"},\"wordCount\":88,\"publisher\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Git-1024x483-1.jpg\",\"articleSection\":[\"GIT\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/\",\"url\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/\",\"name\":\"Top Useful Git Commands for Developers | Provis Technologies\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Git-1024x483-1.jpg\",\"datePublished\":\"2019-01-14T11:26:29+00:00\",\"dateModified\":\"2024-08-26T08:51:51+00:00\",\"description\":\"Discover essential Git commands every developer should know. Simplify your workflow with these powerful Git tips and tricks.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/#primaryimage\",\"url\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Git-1024x483-1.jpg\",\"contentUrl\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Git-1024x483-1.jpg\",\"width\":834,\"height\":350,\"caption\":\"Useful Git Commands\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/useful-git-commands\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Useful Git Commands\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/\",\"name\":\"Provis Technologies\",\"description\":\"Private Limited\",\"publisher\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/#organization\",\"name\":\"Provis Technologies Private Limited\",\"url\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/logo-color.png\",\"contentUrl\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/logo-color.png\",\"width\":345,\"height\":59,\"caption\":\"Provis Technologies Private Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/pages\\\/Provis-Technologies\\\/124371854408675\",\"https:\\\/\\\/x.com\\\/ProvisTech\",\"https:\\\/\\\/www.instagram.com\\\/provistechnologies\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/provis-technologies\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCpeww9f47llsL20ItF0YSDw\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/#\\\/schema\\\/person\\\/476889d2aba4771446a8939b510fbbfa\",\"name\":\"Anish Ojha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bdd9dfa267e591ba30b31c223a2ccaacdc746c90fdbd9dbe8cae5d21468bbf02?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bdd9dfa267e591ba30b31c223a2ccaacdc746c90fdbd9dbe8cae5d21468bbf02?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bdd9dfa267e591ba30b31c223a2ccaacdc746c90fdbd9dbe8cae5d21468bbf02?s=96&d=mm&r=g\",\"caption\":\"Anish Ojha\"},\"description\":\"For the past 8 years, he has been engaging with clients and potential clients to enable business transformation. He is committed to building a reputation for quality and delivery for our clients while building a strong technical and social culture within the company.\",\"url\":\"https:\\\/\\\/provistechnologies.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Top Useful Git Commands for Developers | Provis Technologies","description":"Discover essential Git commands every developer should know. Simplify your workflow with these powerful Git tips and tricks.","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:\/\/provistechnologies.com\/blog\/useful-git-commands\/","og_locale":"en_US","og_type":"article","og_title":"Top Useful Git Commands for Developers | Provis Technologies","og_description":"Discover essential Git commands every developer should know. Simplify your workflow with these powerful Git tips and tricks.","og_url":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/","og_site_name":"Provis Technologies","article_publisher":"https:\/\/www.facebook.com\/pages\/Provis-Technologies\/124371854408675","article_published_time":"2019-01-14T11:26:29+00:00","article_modified_time":"2024-08-26T08:51:51+00:00","og_image":[{"width":834,"height":350,"url":"https:\/\/provistechnologies.com\/blog\/wp-content\/uploads\/2020\/05\/Git-1024x483-1.jpg","type":"image\/jpeg"}],"author":"Anish Ojha","twitter_card":"summary_large_image","twitter_creator":"@ProvisTech","twitter_site":"@ProvisTech","twitter_misc":{"Written by":"Anish Ojha","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/#article","isPartOf":{"@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/"},"author":{"name":"Anish Ojha","@id":"https:\/\/provistechnologies.com\/blog\/#\/schema\/person\/476889d2aba4771446a8939b510fbbfa"},"headline":"Useful Git Commands","datePublished":"2019-01-14T11:26:29+00:00","dateModified":"2024-08-26T08:51:51+00:00","mainEntityOfPage":{"@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/"},"wordCount":88,"publisher":{"@id":"https:\/\/provistechnologies.com\/blog\/#organization"},"image":{"@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/provistechnologies.com\/blog\/wp-content\/uploads\/2020\/05\/Git-1024x483-1.jpg","articleSection":["GIT"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/","url":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/","name":"Top Useful Git Commands for Developers | Provis Technologies","isPartOf":{"@id":"https:\/\/provistechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/#primaryimage"},"image":{"@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/provistechnologies.com\/blog\/wp-content\/uploads\/2020\/05\/Git-1024x483-1.jpg","datePublished":"2019-01-14T11:26:29+00:00","dateModified":"2024-08-26T08:51:51+00:00","description":"Discover essential Git commands every developer should know. Simplify your workflow with these powerful Git tips and tricks.","breadcrumb":{"@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/provistechnologies.com\/blog\/useful-git-commands\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/#primaryimage","url":"https:\/\/provistechnologies.com\/blog\/wp-content\/uploads\/2020\/05\/Git-1024x483-1.jpg","contentUrl":"https:\/\/provistechnologies.com\/blog\/wp-content\/uploads\/2020\/05\/Git-1024x483-1.jpg","width":834,"height":350,"caption":"Useful Git Commands"},{"@type":"BreadcrumbList","@id":"https:\/\/provistechnologies.com\/blog\/useful-git-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/provistechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Useful Git Commands"}]},{"@type":"WebSite","@id":"https:\/\/provistechnologies.com\/blog\/#website","url":"https:\/\/provistechnologies.com\/blog\/","name":"Provis Technologies","description":"Private Limited","publisher":{"@id":"https:\/\/provistechnologies.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/provistechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/provistechnologies.com\/blog\/#organization","name":"Provis Technologies Private Limited","url":"https:\/\/provistechnologies.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/provistechnologies.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/provistechnologies.com\/blog\/wp-content\/uploads\/2021\/02\/logo-color.png","contentUrl":"https:\/\/provistechnologies.com\/blog\/wp-content\/uploads\/2021\/02\/logo-color.png","width":345,"height":59,"caption":"Provis Technologies Private Limited"},"image":{"@id":"https:\/\/provistechnologies.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pages\/Provis-Technologies\/124371854408675","https:\/\/x.com\/ProvisTech","https:\/\/www.instagram.com\/provistechnologies\/","https:\/\/www.linkedin.com\/company\/provis-technologies","https:\/\/www.youtube.com\/channel\/UCpeww9f47llsL20ItF0YSDw"]},{"@type":"Person","@id":"https:\/\/provistechnologies.com\/blog\/#\/schema\/person\/476889d2aba4771446a8939b510fbbfa","name":"Anish Ojha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/bdd9dfa267e591ba30b31c223a2ccaacdc746c90fdbd9dbe8cae5d21468bbf02?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/bdd9dfa267e591ba30b31c223a2ccaacdc746c90fdbd9dbe8cae5d21468bbf02?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bdd9dfa267e591ba30b31c223a2ccaacdc746c90fdbd9dbe8cae5d21468bbf02?s=96&d=mm&r=g","caption":"Anish Ojha"},"description":"For the past 8 years, he has been engaging with clients and potential clients to enable business transformation. He is committed to building a reputation for quality and delivery for our clients while building a strong technical and social culture within the company.","url":"https:\/\/provistechnologies.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=281"}],"version-history":[{"count":10,"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/281\/revisions"}],"predecessor-version":[{"id":2932,"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/281\/revisions\/2932"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/media\/1438"}],"wp:attachment":[{"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/provistechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}