{"id":1699,"date":"2014-11-20T21:39:45","date_gmt":"2014-11-20T20:39:45","guid":{"rendered":"http:\/\/denbeke.be\/blog\/?p=1699"},"modified":"2014-11-20T21:40:58","modified_gmt":"2014-11-20T20:40:58","slug":"git-ignore-changes-in-tracked-file","status":"publish","type":"post","link":"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/","title":{"rendered":"Git: ignore changes in tracked file"},"content":{"rendered":"<p>Sometimes you have changes on a tracked file, but you want to ignore that file (but keep it in the Git tree). Adding those files to a <code>.gitignore<\/code> file will not work, because Git will not ignore tracked files.<\/p>\n<p>However&#8230; You can ignore tracked files using the following command:<\/p>\n<pre><code>git update-index --assume-unchanged &lt;file&gt;<\/code><\/pre>\n<p>To stop ignoring the files, use the following command:<\/p>\n<pre><code>git update-index --no-assume-unchanged &lt;file&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you have changes on a tracked file, but you want to ignore that file (but keep it in the Git tree). Adding those files to a .gitignore file will not work, because Git will not ignore tracked files. However&#8230; You can ignore tracked files using the following command: git update-index &#8211;assume-unchanged &lt;file&gt; To stop [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[161],"tags":[210],"class_list":["post-1699","post","type-post","status-publish","format-standard","hentry","category-software","tag-git","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Git: ignore changes in tracked file &#8211; DenBeke<\/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:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git: ignore changes in tracked file &#8211; DenBeke\" \/>\n<meta property=\"og:description\" content=\"Sometimes you have changes on a tracked file, but you want to ignore that file (but keep it in the Git tree). Adding those files to a .gitignore file will not work, because Git will not ignore tracked files. However&#8230; You can ignore tracked files using the following command: git update-index --assume-unchanged &lt;file&gt; To stop [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/\" \/>\n<meta property=\"og:site_name\" content=\"DenBeke\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-20T20:39:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-11-20T20:40:58+00:00\" \/>\n<meta name=\"author\" content=\"Mathias Beke\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MthsBk\" \/>\n<meta name=\"twitter:site\" content=\"@MthsBk\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mathias Beke\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/software\\\/git-ignore-changes-in-tracked-file\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/software\\\/git-ignore-changes-in-tracked-file\\\/\"},\"author\":{\"name\":\"Mathias Beke\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#\\\/schema\\\/person\\\/386878f712fe3fe22227216f087772dc\"},\"headline\":\"Git: ignore changes in tracked file\",\"datePublished\":\"2014-11-20T20:39:45+00:00\",\"dateModified\":\"2014-11-20T20:40:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/software\\\/git-ignore-changes-in-tracked-file\\\/\"},\"wordCount\":63,\"commentCount\":0,\"keywords\":[\"git\"],\"articleSection\":[\"Software\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/denbeke.be\\\/blog\\\/software\\\/git-ignore-changes-in-tracked-file\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/software\\\/git-ignore-changes-in-tracked-file\\\/\",\"url\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/software\\\/git-ignore-changes-in-tracked-file\\\/\",\"name\":\"Git: ignore changes in tracked file &#8211; DenBeke\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#website\"},\"datePublished\":\"2014-11-20T20:39:45+00:00\",\"dateModified\":\"2014-11-20T20:40:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#\\\/schema\\\/person\\\/386878f712fe3fe22227216f087772dc\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/software\\\/git-ignore-changes-in-tracked-file\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/denbeke.be\\\/blog\\\/software\\\/git-ignore-changes-in-tracked-file\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/software\\\/git-ignore-changes-in-tracked-file\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Git: ignore changes in tracked file\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/\",\"name\":\"DenBeke\",\"description\":\"Mathias Beke\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#\\\/schema\\\/person\\\/386878f712fe3fe22227216f087772dc\",\"name\":\"Mathias Beke\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g\",\"caption\":\"Mathias Beke\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Git: ignore changes in tracked file &#8211; DenBeke","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:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/","og_locale":"en_US","og_type":"article","og_title":"Git: ignore changes in tracked file &#8211; DenBeke","og_description":"Sometimes you have changes on a tracked file, but you want to ignore that file (but keep it in the Git tree). Adding those files to a .gitignore file will not work, because Git will not ignore tracked files. However&#8230; You can ignore tracked files using the following command: git update-index --assume-unchanged &lt;file&gt; To stop [&hellip;]","og_url":"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/","og_site_name":"DenBeke","article_published_time":"2014-11-20T20:39:45+00:00","article_modified_time":"2014-11-20T20:40:58+00:00","author":"Mathias Beke","twitter_card":"summary_large_image","twitter_creator":"@MthsBk","twitter_site":"@MthsBk","twitter_misc":{"Written by":"Mathias Beke"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/#article","isPartOf":{"@id":"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/"},"author":{"name":"Mathias Beke","@id":"https:\/\/denbeke.be\/blog\/#\/schema\/person\/386878f712fe3fe22227216f087772dc"},"headline":"Git: ignore changes in tracked file","datePublished":"2014-11-20T20:39:45+00:00","dateModified":"2014-11-20T20:40:58+00:00","mainEntityOfPage":{"@id":"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/"},"wordCount":63,"commentCount":0,"keywords":["git"],"articleSection":["Software"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/","url":"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/","name":"Git: ignore changes in tracked file &#8211; DenBeke","isPartOf":{"@id":"https:\/\/denbeke.be\/blog\/#website"},"datePublished":"2014-11-20T20:39:45+00:00","dateModified":"2014-11-20T20:40:58+00:00","author":{"@id":"https:\/\/denbeke.be\/blog\/#\/schema\/person\/386878f712fe3fe22227216f087772dc"},"breadcrumb":{"@id":"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/denbeke.be\/blog\/software\/git-ignore-changes-in-tracked-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/denbeke.be\/blog\/"},{"@type":"ListItem","position":2,"name":"Git: ignore changes in tracked file"}]},{"@type":"WebSite","@id":"https:\/\/denbeke.be\/blog\/#website","url":"https:\/\/denbeke.be\/blog\/","name":"DenBeke","description":"Mathias Beke","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/denbeke.be\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/denbeke.be\/blog\/#\/schema\/person\/386878f712fe3fe22227216f087772dc","name":"Mathias Beke","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g","caption":"Mathias Beke"}}]}},"_links":{"self":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts\/1699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/comments?post=1699"}],"version-history":[{"count":2,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts\/1699\/revisions"}],"predecessor-version":[{"id":1701,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts\/1699\/revisions\/1701"}],"wp:attachment":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/media?parent=1699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/categories?post=1699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/tags?post=1699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}