Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » How to untrack already tracked files(Untrack indexed files)
How to untrack already tracked files [message #991345] Tue, 18 December 2012 15:37 Go to next message
Liron Keren is currently offline Liron KerenFriend
Messages: 1
Registered: December 2012
Junior Member
We are using the Eclipse EGit Plug-In to work with Git and integrate with BitBucket and we are having issues to untrack already tracked files from a repository and populating this change to other team members via PULL.

This is how we do it:
1. Working in a branch (not the master branch)
2. Untrack an already tracked file using Team context menu, Untrack
3. Adding the file to .gitignore
4. Commit changes on the branch
5. Switch to master
6. Merge
7. Push

It doesn't look like the untrack change from the branch was merged to the master branch and of course wasn't pushed as a change to the remote repository.

Can someone suggest a resolution?

Re: How to untrack already tracked files [message #991383 is a reply to message #991345] Tue, 18 December 2012 20:32 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Works fine for me in EGit After step 6 the deleted file is removed from the master branch and the filename is added to .gitignore -- exactly what I would expect.

What do you see in master after the merge, and what version of EGit are you using?

I would normally use 'delete' in this scenario, rather than 'untrack', since the untracked file won't survive steps 5 & 6 anyway. But I suppose it's handy to keep the untracked file around in the branch briefly so you can do step 3 via Team -> Ignore, which is a bit more reliable than editing .gitignore manually.

Re: How to untrack already tracked files [message #991997 is a reply to message #991383] Thu, 20 December 2012 16:22 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1184
Registered: July 2009
Senior Member
You can't do that using the commit dialog since it's using the jgit equivalent of commit -o which by definition ignores the index.
But the fact that you want to no longer track a file which was tracked so far is only reflected in the index Sad
Hence (at least at the moment) you need to use the staging view in order to be able to commit untracking a file which was tracked
Previous Topic:Synchronize View remains empty despite lots of unstaged changes?
Next Topic:Egit well installed, but no GIT menu
Goto Forum:

Current Time: Tue Sep 21 15:10:45 GMT 2021

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

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

Back to the top