On 07/02/2011 17:12, Chris Aniszczyk wrote:
> File->Replace With->...
>
> For resetting a current file... you'll have to wait until 0.12... it's
> going through the review process now...
>
> http://egit.eclipse.org/r/#change,2415
On 2011-02-06 13.10, Phillipus wrote:
> Hi,
>
> I'm getting to know eGit and git a whole lot better. It's looking good.
>
> Is it possible to unstage/reset a single file? I know I can do a reset
> for all staged files, but I'd like to do a single file, the equivalent of:
>
> git reset HEAD newfile.java
>
> Thanks
If you Enable quick diff you can select all text, right click in the
quickdiff bar to the left of the source code and select Revert
Selection. It reverts to the quickdiff baseline, which is by default HEAD.
On 09/02/2011 11:42, Robin Rosenberg wrote:
> On 2011-02-06 13.10, Phillipus wrote:
>> Hi,
>>
>> I'm getting to know eGit and git a whole lot better. It's looking good.
>>
>> Is it possible to unstage/reset a single file? I know I can do a reset
>> for all staged files, but I'd like to do a single file, the equivalent of:
>>
>> git reset HEAD newfile.java
>>
>> Thanks
>
> If you Enable quick diff you can select all text, right click in the
> quickdiff bar to the left of the source code and select Revert
> Selection. It reverts to the quickdiff baseline, which is by default HEAD.
>
> -- robin
>
What I'm trying to do is not roll back the local changes to the file but
to "unstage" ("un-Add") it from the index. I can do this in smartgit,
just wondering if it's something planned for eGit.
Try using the mouse and dragging the file from the Staged Changes to Unstaged Changes. It seems to work. Let me know if this is what you were trying to do.
It would good to have a Stage/Unstage button in the Git Staging view. At least an Unstage since you can use Add for the initial Stage.
In addition to drag-and-drop in the Git Staging view, you can also unstage changes with drag-and-drop in the Synchronization view. But I always use the Git Staging view, since Synchronization is too slow for my projects.