{"id":22439,"date":"2020-11-18T00:36:35","date_gmt":"2020-11-18T08:36:35","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=22439"},"modified":"2020-12-29T12:36:23","modified_gmt":"2020-12-29T20:36:23","slug":"git-remove-untracked-files","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/","title":{"rendered":"Removing Untracked Files with Git"},"content":{"rendered":"\n<p><em>You can use the git clean command to remove untracked files. The -fd command removes untracked directories and the git clean -fx command removes ignored and non-ignored files. You can remove untracked files using a .gitignore file.<\/em><\/p>\n\n\n\n<p>There are two types of files in a Git repository: tracked and untracked files. You may encounter a scenario where you need to remove untracked files from a Git repository.<\/p>\n\n\n\n<p>Should we remove untracked files? We may have to do so if:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Our working (local) directory cluttered by unused files<\/li><li>You pointed Git to a folder you didn\u2019t want to<\/li><li>There are leftover files from other merges, or you want to remove certain files.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Git Removed Untracked Files<\/h2>\n\n\n\n<p>You can handle untracked files from a <a href=\"https:\/\/careerkarma.com\/blog\/git-branch\/\">Git branch<\/a> using these methods:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A .gitignore file, which ignores the files and directories in a repository<\/li><li>The git clean -fx command, which removes untracked and tracked files<\/li><li>The git clean -fd command, which removes untracked files and directories<\/li><\/ul>\n\n\n\n<p>In this guide, we&#8217;re going to discuss how to remove untracked files with Git. We&#8217;ll refer to a few examples so you can get started quickly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Difference Between Tracked vs. Untracked Files<\/strong><\/h2>\n\n\n\n<p>In your working or local directory your files are either tracked or untracked. <strong>Tracked<\/strong> means those files added and committed in a previous snapshot and that Git is aware, tracking them for changes.<\/p>\n\n\n\n<p><strong>Untracked<\/strong> files are the opposite, those files were not in the previous commit and have not been staged to be committed. You have the option of either stage them and commit them to your repository, or remove them!<\/p>\n\n\n\n<p>If we do <a href=\"https:\/\/careerkarma.com\/blog\/git-status\/\"><em>git status<\/em><\/a> right after modifying\/added files it would show us the list of untracked files and files that are tracked.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Remove Untracked Files Git Option 1: .gitignore<\/strong><\/h2>\n\n\n\n<p>The first option is to <strong>ignore<\/strong> such files. You could be working on a C++ project that during build you might get files generated you don\u2019t want  available.<\/p>\n\n\n\n<p>For instance, you may have a <em>.env<\/em> file with all your environment variables and database, API, access keys. You wouldn\u2019t want that info out there in the wild either right? This is where <a href=\"https:\/\/careerkarma.com\/blog\/gitignore\/\"><em>.gitignore<\/em> files<\/a> come in to play.<\/p>\n\n\n\n<p>Any files that are present in a <em>.gitignore<\/em> file will not be part of the untracked\/tracked Git flow. They\u2019ll be <em>removed<\/em> from it. So Git will ignore them and not track them nor complain they are not tracked.&nbsp;<\/p>\n\n\n\n<p>First, let\u2019s create a <em>.gitignore<\/em> file in root. And then we\u2019ll specify the relative path of the location. So if let\u2019s say we want to hide the node_modules and config.env file we just add them as such:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>node_modules\nconfig.env<\/pre><\/div>\n\n\n\n<p>Understanding Gitignore is essential as your project grows so you must be aware which folders or files need to be added there. This is because you don&#8217;t want them in the Git workflow as untracked to then stage them by mistake and have Git tracking such sensitive files for everyone to see your keys exposed!<\/p>\n\n\n\n<p>Understanding Gitignore is essential as your project grows so you must be aware which folders or files need to be added there. This is because you don\u2019t want them in the Git workflow as untracked to stage them by mistake. This would cause Git to start tracking files with information that should not be shared in a repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Remove Untracked Files Git<strong> Option 2: git clean<\/strong><\/h2>\n\n\n\n<p>The next option we have to remove the files is to use the <em>git clean<\/em> command. The git clean command deletes untracked files from a repository.<\/p>\n\n\n\n<p>The git clean command starts from your current working directory inside your working tree. Your working tree is the branch you are viewing.<\/p>\n\n\n\n<p>This command would be useful in case, for instance, you accidentally add a folder with high school pictures into a repository instead of another folder.<\/p>\n\n\n\n<p>Git clean takes a couple of options. Let&#8217;s take a look at the syntax for this command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git clean [-d] [-f] [-i] [-n] [-q] [-e &lt;pattern&gt;] [-x | -X] [--] &lt;path&gt;\u2026\u200b<\/pre><\/div>\n\n\n\n<p>At this point it is worth mentioning that Git clean <strong>deletes your file in a hard system way<\/strong>. This means you cannot undo your changes. It is similar to the <em>rm<\/em> command in the terminal. But, if a file was tracked in a previous commit, we may be able to find an old version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>git clean -d -n<\/strong><\/h3>\n\n\n\n<p>If we don\u2019t specify a path we often want to include the <em>-d <\/em>option to have Git look into untracked directories.&nbsp;<\/p>\n\n\n\n<p>We should include the -n <strong>dry run option<\/strong> first. This instructs Git to warn us what will be removed before deleting it. In other words, the -n flag performs a dry run of our clean function. Then, we can run git clean once we are sure our changes have been made.<\/p>\n\n\n\n<p>Using this option will give us a safeguard against removing files that we are not ready to remove, or do not want to remove. Here\u2019s how we end up with the <em>git clean -d -n<\/em> command.&nbsp;<\/p>\n\n\n\n<p>Let\u2019s look at this in action. We have our sillyPicture.jpg we don\u2019t want to track and want to remove. Check what will happen:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"264\" height=\"32\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92678123-e36c0e00-f2ea-11ea-8e04-e2014f65a1dc.png\" alt=\"\" class=\"wp-image-22440\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92678123-e36c0e00-f2ea-11ea-8e04-e2014f65a1dc.png 264w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92678123-e36c0e00-f2ea-11ea-8e04-e2014f65a1dc-20x2.png 20w\" sizes=\"auto, (max-width: 264px) 100vw, 264px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>git clean -f&nbsp;<\/strong><\/h3>\n\n\n\n<p>In order to get Git clean to work, we may need to specify a <strong>force option<\/strong><em><strong>. <\/strong><\/em>This option should only be used if you are sure that you want to remove the files you have selected from a repository.<\/p>\n\n\n\n<p>Let\u2019s go ahead and remove our sillyPicture.jpg with <em>git clean -f <\/em>or you can be more specific with <em>git clean -f sillyPicture.jpg<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"489\" height=\"188\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92679422-00561080-f2ee-11ea-8c77-aad69740b4d2.png\" alt=\"\" class=\"wp-image-22441\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92679422-00561080-f2ee-11ea-8c77-aad69740b4d2.png 489w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92679422-00561080-f2ee-11ea-8c77-aad69740b4d2-20x8.png 20w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92679422-00561080-f2ee-11ea-8c77-aad69740b4d2-385x148.png 385w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/figure>\n\n\n\n<p>Here you might notice that here git status first pointed out there was an untracked file, then after we deleted with the <em>-f<\/em> option the file was then gone. C\u2019est fini!<\/p>\n\n\n\n<p>Although the <em>-f <\/em>option and Git clean is very powerful, it will not work with ignored files. This because it only works with files Git is aware of and are part of its version control system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>git clean -x<\/strong><\/h3>\n\n\n\n<p>This is not recommended unless you really know what you are doing. <strong>Yes<\/strong> you can remove ignored files and directories. To do this just use the <em>-x<\/em> option. So <em>git clean -d -x -f<\/em> will do that as easy as the blink of an eye. But don\u2019t use it, just yet.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>git clean -d -i<\/strong><\/h3>\n\n\n\n<p>Recommended for beginners. As you\u2019re getting started you might want to be careful of what options you pass in. We already showed you the dry run <em>-n<\/em> option. There\u2019s also the <em>-i<\/em> option that will show you an interactive interface you can play with!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"618\" height=\"175\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92680157-d0a80800-f2ef-11ea-8905-62175b19c433.jpg\" alt=\"\" class=\"wp-image-22442\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92680157-d0a80800-f2ef-11ea-8905-62175b19c433.jpg 618w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92680157-d0a80800-f2ef-11ea-8905-62175b19c433-385x109.png 385w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/92680157-d0a80800-f2ef-11ea-8905-62175b19c433-20x6.jpg 20w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>You can remove untracked files from a repository using either the .gitignore or the git clean command. The git clean command removes files recursively. This command starts in your current working directory.<\/p>\n\n\n\n<p>To learn more about Git, read our <a href=\"https:\/\/careerkarma.com\/blog\/what-is-git\/\">How to Learn Git guide<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"You can use the git clean command to remove untracked files. The -fd command removes untracked directories and the git clean -fx command removes ignored and non-ignored files. You can remove untracked files using a .gitignore file. There are two types of files in a Git repository: tracked and untracked files. You may encounter a&hellip;","protected":false},"author":86,"featured_media":22443,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17286],"tags":[],"class_list":{"0":"post-22439","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-git"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Git","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Removing Untracked Files with Git | Career Karma<\/title>\n<meta name=\"description\" content=\"Did you know that files in your Git repository can be either tracked or untracked? Find about what to do with untracked files and how to remove them, if needed. Learn Git with CareerKarma.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Removing Untracked Files with Git\" \/>\n<meta property=\"og:description\" content=\"Did you know that files in your Git repository can be either tracked or untracked? Find about what to do with untracked files and how to remove them, if needed. Learn Git with CareerKarma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-18T08:36:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-29T20:36:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/photo-1508643315917-6688bbbb4cb5.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Felipe Boh\u00f3rquez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Felipe Boh\u00f3rquez\" \/>\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:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/\"},\"author\":{\"name\":\"Felipe Boh\u00f3rquez\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e2cbf72dcbfaf9e81a8b6a38c1bd4220\"},\"headline\":\"Removing Untracked Files with Git\",\"datePublished\":\"2020-11-18T08:36:35+00:00\",\"dateModified\":\"2020-12-29T20:36:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/\"},\"wordCount\":1150,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/photo-1508643315917-6688bbbb4cb5.jpeg\",\"articleSection\":[\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/\",\"name\":\"Removing Untracked Files with Git | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/photo-1508643315917-6688bbbb4cb5.jpeg\",\"datePublished\":\"2020-11-18T08:36:35+00:00\",\"dateModified\":\"2020-12-29T20:36:23+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e2cbf72dcbfaf9e81a8b6a38c1bd4220\"},\"description\":\"Did you know that files in your Git repository can be either tracked or untracked? Find about what to do with untracked files and how to remove them, if needed. Learn Git with CareerKarma.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/photo-1508643315917-6688bbbb4cb5.jpeg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/photo-1508643315917-6688bbbb4cb5.jpeg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-remove-untracked-files\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Git\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Removing Untracked Files with Git\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e2cbf72dcbfaf9e81a8b6a38c1bd4220\",\"name\":\"Felipe Boh\u00f3rquez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Screen-Shot-2020-08-17-at-11.10.42-AM-150x150.png\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Screen-Shot-2020-08-17-at-11.10.42-AM-150x150.png\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Screen-Shot-2020-08-17-at-11.10.42-AM-150x150.png\",\"caption\":\"Felipe Boh\u00f3rquez\"},\"description\":\"Felipe Boh\u00f3rquez is a Software Engineer and technical writer at Career Karma. He covers all things frontend and backend development.\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/felipe-bohorquez\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Removing Untracked Files with Git | Career Karma","description":"Did you know that files in your Git repository can be either tracked or untracked? Find about what to do with untracked files and how to remove them, if needed. Learn Git with CareerKarma.","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:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/","og_locale":"en_US","og_type":"article","og_title":"Removing Untracked Files with Git","og_description":"Did you know that files in your Git repository can be either tracked or untracked? Find about what to do with untracked files and how to remove them, if needed. Learn Git with CareerKarma.","og_url":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-11-18T08:36:35+00:00","article_modified_time":"2020-12-29T20:36:23+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/photo-1508643315917-6688bbbb4cb5.jpeg","type":"image\/jpeg"}],"author":"Felipe Boh\u00f3rquez","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Felipe Boh\u00f3rquez","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/"},"author":{"name":"Felipe Boh\u00f3rquez","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e2cbf72dcbfaf9e81a8b6a38c1bd4220"},"headline":"Removing Untracked Files with Git","datePublished":"2020-11-18T08:36:35+00:00","dateModified":"2020-12-29T20:36:23+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/"},"wordCount":1150,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/photo-1508643315917-6688bbbb4cb5.jpeg","articleSection":["Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/","url":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/","name":"Removing Untracked Files with Git | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/photo-1508643315917-6688bbbb4cb5.jpeg","datePublished":"2020-11-18T08:36:35+00:00","dateModified":"2020-12-29T20:36:23+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e2cbf72dcbfaf9e81a8b6a38c1bd4220"},"description":"Did you know that files in your Git repository can be either tracked or untracked? Find about what to do with untracked files and how to remove them, if needed. Learn Git with CareerKarma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/photo-1508643315917-6688bbbb4cb5.jpeg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/photo-1508643315917-6688bbbb4cb5.jpeg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/git-remove-untracked-files\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Git","item":"https:\/\/careerkarma.com\/blog\/git\/"},{"@type":"ListItem","position":3,"name":"Removing Untracked Files with Git"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e2cbf72dcbfaf9e81a8b6a38c1bd4220","name":"Felipe Boh\u00f3rquez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-17-at-11.10.42-AM-150x150.png","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-17-at-11.10.42-AM-150x150.png","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-17-at-11.10.42-AM-150x150.png","caption":"Felipe Boh\u00f3rquez"},"description":"Felipe Boh\u00f3rquez is a Software Engineer and technical writer at Career Karma. He covers all things frontend and backend development.","url":"https:\/\/careerkarma.com\/blog\/author\/felipe-bohorquez\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/22439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=22439"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/22439\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/22443"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=22439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=22439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=22439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}