I force checked in a gitignored file using git add -f. It doesn't belong in there and now I need to remove it from the repo. Is this possible?
            Asked
            
        
        
            Active
            
        
            Viewed 86 times
        
    2
            
            
        - 
                    Possible duplicate of [Remove a file from a Git repository without deleting it from the local filesystem](http://stackoverflow.com/questions/1143796/remove-a-file-from-a-git-repository-without-deleting-it-from-the-local-filesyste) – Konstantin Nov 12 '15 at 05:50
1 Answers
3
            You can git rm --cached it: it removes it from the git repo while keeping the file one the disk.
If you had already committed that file, you would then make a new commit recording the deletion of that same file.
 
    
    
        VonC
        
- 1,262,500
- 529
- 4,410
- 5,250
