Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Eclipse pull is causing dirty_worktree error(git pull is causing dirty_worktree)
Eclipse pull is causing dirty_worktree error [message #1508833] Fri, 12 December 2014 19:13 Go to next message
srijava srijavakanth is currently offline srijava srijavakanthFriend
Messages: 4
Registered: December 2014
Junior Member
Hi all,

Please help me to understand the dirty_worktree issue.

some of the member in team getting this error not everyone.

Trying to download the code (Fetch from remote and Pull)

While doing the pull, it shows the name of the file and says dirty_worktree.

Please help me to understand this issue and how I can solve this.

Thank You,
Re: Eclipse pull is causing dirty_worktree error [message #1565668 is a reply to message #1508833] Thu, 15 January 2015 12:10 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1026
Registered: July 2009
Senior Member
JGit/EGit here prevent that you overwrite modifications you did locally in your working tree.
So if e.g. file A is locally modified and these modifications aren't yet committed and you try
to pull new commits from the server which also modify file A then JGit aborts the pull operation
to prevent that the version of file A coming from the server overwrites your local changes in
the same file.
Re: Eclipse pull is causing dirty_worktree error [message #1773616 is a reply to message #1565668] Sat, 30 September 2017 14:56 Go to previous messageGo to next message
Sara Caruso is currently offline Sara CarusoFriend
Messages: 1
Registered: September 2017
Junior Member
Hi,
I have the same situation: Pull fails because I have some local changes. What can I do to solve this problem? It's enough do right click on the project, then Team, then Commit....
After that can I make Team, then Pull?
Re: Eclipse pull is causing dirty_worktree error [message #1773691 is a reply to message #1773616] Tue, 03 October 2017 04:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29389
Registered: July 2009
Senior Member
I always hate it when that happens. One approach is to copy the particular files that are blocking the pull to somewhere else (or to a renamed form next to the old one) and then comparing what's pulled with what you have before to merge them. Another approach is to use Team -> Stashes -> Stash Changes... and "commit" the dirty files to the stash; I'm always a little scared to do that because I'm sure applying the stash will have merge problems too, and then I'm not completely sure I'll be able to easily recover what's in the stash.... But I think that's the proper approach to take...
Re: Eclipse pull is causing dirty_worktree error [message #1774525 is a reply to message #1773691] Mon, 16 October 2017 19:26 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1026
Registered: July 2009
Senior Member
It depends on what you want to achieve.
If you don't need the local changes you can reset hard to get rid of them.
Otherwise either commit or stash them. Then you can later go back to this change and continue working on it.
Previous Topic:Non-fast-forward reject caused loss
Next Topic:Finding a repository
Goto Forum:
  


Current Time: Thu Jun 21 13:54:18 GMT 2018

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

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

Back to the top