0

Hi normally I use eclipse with egit to do the git magic, but I accidentally added a whole folder to git where files reside I don't want to be under version control.

Is there a possibility to remove them in a way that they don't show up when the repo is cloned to another machine?

I tried git rm and commited/pushed the changes, but it is still cloned to a 3 machine.

Regards and thanks

daeda
  • 369
  • 5
  • 14
  • 1
    Have you already pushed additional changes on top of the faulty commit? – Rangad Dec 21 '14 at 17:39
  • possible duplicate of [Delete commits from a branch in Git](http://stackoverflow.com/questions/1338728/delete-commits-from-a-branch-in-git) – Rangad Dec 21 '14 at 17:39

1 Answers1

0

You might want to try:

git rm -r --cached <target_folder> # Removes folder from git but retaining the local
git commit -m "<target_message>"
git push origin master
nitishagar
  • 9,038
  • 3
  • 28
  • 40