Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to remove a folder from git and not locally

# Remove folder from git and not local filesystem
git rm -r --cached FolderName
git commit -m "Removed folder from repository"
git push origin master

# After the push, make sure to add the folder to .gitignore for future iterations
Source by stackoverflow.cohttps #
 
PREVIOUS NEXT
Tagged: #remove #folder #git #locally
ADD COMMENT
Topic
Name
3+6 =