Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Under what circumstances does EGit automatically stage file changes?
Under what circumstances does EGit automatically stage file changes? [message #1716300] Wed, 02 December 2015 18:27 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 790
Registered: July 2009
Senior Member
When using git outside of Eclipse, I have to manually stage file modifications. I can even stage a set of mods to a file, and then later make additional changes to the file that are not yet staged. A commit at that point will commit the staged changes to the file, but not the unstaged changes.

It seems likely to me that EGit is automatically staging file modifications.

What I'm wondering is, when is that staging happening? Does it stage a file as soon as it detects the file save? What if I change a file in the project outside of Eclipse? Does it stage the modification as soon as it detects the file has been modified?
Re: Under what circumstances does EGit automatically stage file changes? [message #1716349 is a reply to message #1716300] Thu, 03 December 2015 07:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32902
Registered: July 2009
Senior Member
David,

Comments below.

On 02/12/2015 7:27 PM, David M. Karr wrote:
> When using git outside of Eclipse, I have to manually stage file
> modifications. I can even stage a set of mods to a file, and then
> later make additional changes to the file that are not yet staged. A
> commit at that point will commit the staged changes to the file, but
> not the unstaged changes.
>
> It seems likely to me that EGit is automatically staging file
> modifications.
No, the only time I see this happen is when I delete a file within
Eclipse. That deletion is automatically staged. I personally don't
like this feature because there are cases (Oomph's version builder)
where I delete the file so it will be regenerated, so I end up manually
unstaging the deletion.
>
> What I'm wondering is, when is that staging happening? Does it stage
> a file as soon as it detects the file save?
No.
> What if I change a file in the project outside of Eclipse?
If you hit the refresh button in the staging view, it appears to notice
any changes made outside of Eclipse (and to match what you see in the
command line).
> Does it stage the modification as soon as it detects the file has been
> modified?
I guess most of this can be answered by looking at what's going on in
the Staging view. Generally changes remain in the Unstaged changes
section until you manually move them to the Staged changes section.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Under what circumstances does EGit automatically stage file changes? [message #1716553 is a reply to message #1716349] Fri, 04 December 2015 18:38 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 790
Registered: July 2009
Senior Member
Quite a few times, I've started work on some changes by just modifying the files, saving them, doing tests, and then committing them, followed by a push. Except for when those files were initially added, I never do anything to add those file modifications to staging.
Re: Under what circumstances does EGit automatically stage file changes? [message #1716687 is a reply to message #1716553] Mon, 07 December 2015 14:38 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1240
Registered: July 2009
Senior Member
EGit stages deletions automatically, for all other changes this is manual
Previous Topic:EGIT/GIT Eclipse contribution : difficulties with setup
Next Topic:Use JGit in custom language plugin to ref user-entered git/github urls?
Goto Forum:
  


Current Time: Fri Sep 01 06:20:29 GMT 2023

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

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

Back to the top