Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » remove a folder from git control
remove a folder from git control [message #1222371] Fri, 20 December 2013 04:02 Go to next message
Eclipse UserFriend
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 07:33 Go to previous messageGo to next message
Eclipse UserFriend
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 05:40 Go to previous messageGo to next message
Eclipse UserFriend
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 16:14 Go to previous messageGo to next message
Eclipse UserFriend
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 16:45] by Moderator

Re: remove a folder from git control [message #1746418 is a reply to message #1744986] Fri, 28 October 2016 08:43 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 19:35:54 EDT 2025

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

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

Back to the top