Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

How To Get Git to Stop Tracking Files in .GitIgnore - Git

RSS
Modified on Thu, Dec 29, 2016, 1:10 PM by Administrator Categorized as Visual Studio and Developer Tools

Overview

There is a file that was being tracked at one time by git, but now the file is on the .gitignore list. However, that file keeps showing up in git status after it's edited. This article explains how to get git to completely forget about it.

Reference

Adapted from http://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore/19095988#19095988

Solution

git rm -r --cached . 
git add .

Then:

git commit -am "Remove ignored files"

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2018, Patrick Jasinski.