Skip to content

Instantly share code, notes, and snippets.

@freimanas
Created November 18, 2015 23:46
Show Gist options
  • Save freimanas/f34ca888e725c2c90427 to your computer and use it in GitHub Desktop.
Save freimanas/f34ca888e725c2c90427 to your computer and use it in GitHub Desktop.
remove file from git without locally deleting it
#for this example it will be .idea
echo '.idea' >> .gitignore
git rm -r --cached .idea
git add .gitignore
git commit -m '(some message stating you added .idea to ignored entries)'
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment