Answers for "remove git from git history"

1

remove git from git history

Remove .git folder inside of untracked submodule.
Run git rm --cached path-to-folder
git add . in parent or root folder and you are good to go
Posted by: Guest on October-16-2021
0

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
Posted by: Guest on July-29-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language