Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Derived files like .class files
Derived files like .class files [message #703483] Wed, 27 July 2011 16:02 Go to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi,

Making my first steps with Git i'm stumbling about the fact that Git/Egit (can not really distinguish that for now) againa and again claims that some binary derived files are NOT ignored, see attached screenshot. Multiple times I have selected "Igore" from the Git menu on all my bin/ folders. Seems to have no effect. Is it a bug in EGit or am I doing something wrong?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Derived files like .class files [message #704093 is a reply to message #703483] Thu, 28 July 2011 09:17 Go to previous messageGo to next message
Carsten Reckord is currently offline Carsten ReckordFriend
Messages: 139
Registered: July 2009
Senior Member
Hi Eike,

Did you by chance ever accidentally commit anything in your bin folder?
Because Git won't allow you to ignore further changes to any resource
already under its control.

If you have a Git console at hand, could you check what "git status" has to
say about that file?

What does the .gitignore in your project root and .git/info/exclude in your
repository root contain?

Best Regards,
Carsten

On 27.07.2011 18:02, Eike Stepper wrote:
> Hi,
>
> Making my first steps with Git i'm stumbling about the fact that Git/Egit (can not really distinguish that for now) againa and again claims that some binary derived files are NOT ignored, see attached screenshot. Multiple times I have selected "Igore" from the Git menu on all my bin/ folders. Seems to have no effect. Is it a bug in EGit or am I doing something wrong?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
>
Re: Derived files like .class files [message #704476 is a reply to message #704093] Thu, 28 July 2011 17:16 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 28.07.2011 11:17, schrieb Carsten Reckord:
> Hi Eike,
>
> Did you by chance ever accidentally commit anything in your bin folder?
Yes, I'm sure about that. At the beginning I did not even think about it because I thought that the global team ignores are respected.

> Because Git won't allow you to ignore further changes to any resource
> already under its control.
That would explain it. How can I get rid of them now?

> If you have a Git console at hand, could you check what "git status" has to
> say about that file?
I don't have one at hand right now and I'm about to leave for some days off. I can check next Wednesday ;-)

> What does the .gitignore in your project root
It contains "bin/".

> and .git/info/exclude in your
> repository root contain?
..git does not contain a folder named "info".

Thanks for your answer!

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


> Best Regards,
> Carsten
>
> On 27.07.2011 18:02, Eike Stepper wrote:
>> Hi,
>>
>> Making my first steps with Git i'm stumbling about the fact that Git/Egit (can not really distinguish that for now) againa and again claims that some binary derived files are NOT ignored, see attached screenshot. Multiple times I have selected "Igore" from the Git menu on all my bin/ folders. Seems to have no effect. Is it a bug in EGit or am I doing something wrong?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>>


Re: Derived files like .class files [message #704556 is a reply to message #704476] Thu, 28 July 2011 18:55 Go to previous messageGo to next message
Carsten Reckord is currently offline Carsten ReckordFriend
Messages: 139
Registered: July 2009
Senior Member
On 28.07.2011 19:16, Eike Stepper wrote:
> Am 28.07.2011 11:17, schrieb Carsten Reckord:
>> Hi Eike,
>>
>> Did you by chance ever accidentally commit anything in your bin folder?
> Yes, I'm sure about that. At the beginning I did not even think about it because I thought that the global team ignores are respected.
>
>> Because Git won't allow you to ignore further changes to any resource
>> already under its control.
> That would explain it. How can I get rid of them now?

You can find a basic howto here:
http://progit.org/book/ch6-4.html#removing_a_file_from_every_commit

However, be warned that this will rewrite every commit containing that
file/folder and it's a baaad idea to rewrite commits that have already been
pushed to a public repository.

A less intrusive but also less thorough way would be to remove the file from
all branches with a new change by doing

git rm -r bin/
git commit

You should be good regarding everything past these commits, but you'll still
have trouble swiching to and from earlier commits from your history.
Re: Derived files like .class files [message #705797 is a reply to message #704476] Sat, 30 July 2011 11:06 Go to previous message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Eike Stepper skrev 2011-07-28 19.16:
> Am 28.07.2011 11:17, schrieb Carsten Reckord:
>> Hi Eike,
>>
>> Did you by chance ever accidentally commit anything in your bin folder?
> Yes, I'm sure about that. At the beginning I did not even think about it
> because I thought that the global team ignores are respected.
>

They are, unless that changed very recently. If I create a Java project,
add a class, share it and Add the project, the bin directory does not
get added.

-- robin
Previous Topic:Creation of Git Repository while creating the project
Next Topic:How do you add a change to the index?
Goto Forum:
  


Current Time: Tue Mar 19 08:47:42 GMT 2024

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

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

Back to the top