Reputation: 312
By mistake I have committed .project file in git from Eclipse. As this file name starts with a dot it is not visible in git files in Eclipse. How do I delete it from git using Eclipse?
Upvotes: 3
Views: 3846
Reputation: 1478
Instead off deleting .project file (as it is used by IDE) you should probably ignore .project file by adding it to exclude file
Location of exclude file
.git/info/exclude
Upvotes: 2
Reputation: 310
You can use the git rm
directly.
More here: https://git-scm.com/docs/git-rm
Upvotes: 0
Reputation: 34135
.project
and choose Team > Advanced > Untrack.project
again and choose Team > IgnoreUpvotes: 3
Reputation: 151
If you already have a file checked in, and you want to ignore it, Git will not ignore the file if you add a rule later. In those cases, you must untrack the file first, by running the following command in your terminal:
git rm --cached FILENAME
There is a file named as .gitignore in your project directory. If not, you can create a new file in your project directory and name the file as '.gitignore'. Write in file -> '.project' and save. Now try pushing your code up. I hope it works. This file is essentially to ignore all the files mentioned while sync on GIT.
Upvotes: 7