Skip to content

Instantly share code, notes, and snippets.

@mir4ef
Created June 30, 2016 17:59
Show Gist options
  • Save mir4ef/dfe0f8fa7e27633347c575510298e501 to your computer and use it in GitHub Desktop.
Save mir4ef/dfe0f8fa7e27633347c575510298e501 to your computer and use it in GitHub Desktop.
Remove a file/folder from git repo, but keep local
git rm --cached file-name.txt
git rm -r --cached folder-name
git commit -m "removed file-name and/or folder-name"
git push origin master or branch-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment