Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docs:git:completely_remove_a_file_from_all_revisions [2010/02/24 10:41] – created billhdocs:git:completely_remove_a_file_from_all_revisions [2010/02/24 10:47] (current) billh
Line 1: Line 1:
 ====== completely remove a file from all revisions ====== ====== completely remove a file from all revisions ======
-You find a file that should never have been committed into the repo.  Adding the file to a .gitignore list doesn't get rid of it for you, and you want the file to disappear from everything.  (probably a good idea to back up repo before doing this)+If you've added a file to a .gitignore list and it still shows up for commits, you can ignore it from that point on by removing it with this: 
 +<code> 
 +git rm --cached <file> 
 +</code> 
 + 
 +If you find a file that should never have been committed into the repo, you need to do more than this.  Adding the file to a .gitignore list doesn't get rid of it for you, and you want the file to disappear from everything.  (probably a good idea to back up repo before doing this)
  
 **method 1** **method 1**
  • docs/git/completely_remove_a_file_from_all_revisions.1267033303.txt.gz
  • Last modified: 2010/02/24 10:41
  • by billh