Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git remove file from history

$ git rm --cached giant_file
// Stage our giant file for removal, but leave it on disk
Comment

delete a file from repo history

$ git filter-branch --force --index-filter 
  "git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA" 
  --prune-empty --tag-name-filter cat -- --all
  > Rewrite 48dc599c80e20527ed902928085e7861e6b3cbe6 (266/266)
  > Ref 'refs/heads/main' was rewritten
Comment

remove file history from git

git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD
Comment

PREVIOUS NEXT
Code Example
Shell :: install expo react native 
Shell :: git command to create a branch from another branch 
Shell :: tail linux 
Shell :: new branch not showing in visual studio 
Shell :: npm dotenv 
Shell :: how to enable camera in ubuntu 
Shell :: como instalar brew en linux 
Shell :: how to call a batch file from another batch file 
Shell :: conda install python image library 
Shell :: gitlab ci yml example 
Shell :: add user to docker group 
Shell :: react native ubuntu 20.04 
Shell :: close tcp port on mac 
Shell :: find exclude specific file 
Shell :: linux cli see screen resolution 
Shell :: remove commits from github 
Shell :: bash count lines 
Shell :: remove port iptables 
Shell :: how to delete command from terminal history 
Shell :: where are fonts on linux 
Shell :: git mirror repository 
Shell :: git deinit repo 
Shell :: shell comments 
Shell :: install radeon drivers ubuntu 
Shell :: bash upgrade cmake (From Source) 
Shell :: redis delete key 
Shell :: git go back to previous commit temporarily 
Shell :: install latest node js ubuntu 
Shell :: ubuntu copy 
Shell :: wsl ubuntu update time 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =