Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git remove from history

$ git rm --cached giant_file
# Stage our giant file for removal, but leave it on disk
$ git commit --amend -CHEAD
# Amend the previous commit with your change
# Simply making a new commit won't work, as you need
# to remove the file from the unpushed history as well
Source by docs.github.com #
 
PREVIOUS NEXT
Tagged: #git #remove #history
ADD COMMENT
Topic
Name
5+1 =