Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » remove a folder from git control
remove a folder from git control [message #1222371] Fri, 20 December 2013 09:02 Go to next message
Rémy Schumm is currently offline Rémy SchummFriend
Messages: 1
Registered: December 2013
Junior Member
This is a classical problem - I cannot find a obvious solution. Although it happens twice a week or so...

Scenario
Somebody commits and pushed a folder or file that should not be under version control: e.g. /target or .settings or .project

Question
How to remove this folder or file from git version control, without!! deleting it from the local working copy?? With EGit?

Re: remove a folder from git control [message #1222801 is a reply to message #1222371] Sat, 21 December 2013 12:33 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
I don't know why you wouldn't want to keep .project and .settings under version control, but that aside, the EGit operation is Team -> Advanced -> Untrack
Re: remove a folder from git control [message #1224646 is a reply to message #1222801] Fri, 27 December 2013 10:40 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 884
Registered: July 2009
Senior Member
And note that you can't commit files you untracked using the commit dialog since it does the
equivalent of git commit -o which ignores the git index. Though you can commit such untracked files
using the staging view.
Re: remove a folder from git control [message #1744986 is a reply to message #1224646] Mon, 03 October 2016 20:14 Go to previous messageGo to next message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 9
Registered: July 2016
Junior Member
I believe the OP is asking how to untrack Eclipse-specific files (the target/ dir can be untracked via eGit, as it actually appears in Eclipse). Files/dirs like .settings/, .classpath, and .project are hidden within Eclipse, so it does not appear that you can select them to untrack them if they have been added by mistake. Is there a way to do this with eGit, or do we need to use the git CLI?

[Updated on: Mon, 03 October 2016 20:45]

Report message to a moderator

Re: remove a folder from git control [message #1746418 is a reply to message #1744986] Fri, 28 October 2016 12:43 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 884
Registered: July 2009
Senior Member
By default hidden files starting with a "." are also hidden in Eclipse. You can make them visible in the following way:
- open project explorer
- click the view menu (little triangle in the top right corner of the view)
- click "Customize View..."
- in the Tab "Filters" unselect the entry ".* resources"
- click ok
then you should see hidden files also in the project explorer,
similar menu entries are available in other browsing views like e.g. Package Explorer
Previous Topic:Can't separate Git workspace and repository from Eclipse project metadata
Next Topic:SSH proxy connection with JGit library
Goto Forum:
  


Current Time: Sat Dec 03 17:46:31 GMT 2016

Powered by FUDForum. Page generated in 0.17452 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software