3

Possible Duplicate:
Git: Remove a file from the repository without deleting it from the local filesystem

I know that the code "git rm" can remove a file from git repository,but it also delete the file from muy computer.

Is there a method to remove a file from git repository without deleting the file from my computer actually?

Community
  • 1
  • 1
Gina
  • 173
  • 1
  • 4
  • 12

1 Answers1

8

git rm --cached filename

will keep the file on your computer.

It's the git equivalent to svn's svn delete --keep-local

lindon fox
  • 3,298
  • 3
  • 33
  • 59
Gnujeremie
  • 570
  • 3
  • 17