0

How do I remove files in the remote repository?

2
  • 1
    Do you want to remove files from your project for the future or do you want to remove files from previous commits because they contain passwords or some similar reason? Commented Jun 24, 2010 at 9:53
  • git rm path and then commit-push does not work?
    – pakore
    Commented Jun 24, 2010 at 9:54

2 Answers 2

3

Remove file from repository and filesystem

git rm my_path/my_file

Force removing file

git rm --force my_path/my_file

Remove file only from your repository not in your file system

git rm --cached my_path/my_file
1
  • is there anyway to do it in Git GUI? Commented Jun 24, 2010 at 10:44
0

I think you can try this git filter-branch command to rewrite remote origin branch. So that delete those files you wanna clean in all commits.

http://git-scm.com/docs/git-filter-branch

Not the answer you're looking for? Browse other questions tagged or ask your own question.