Git ignore won't work, but eclipse ignore works? - eclipse

I have a dynamic web project in eclipse. I used the Git GUI tool to place it under source control.
Then, suddenly my project icons were decorated with git related images. Anyway, after that
I wanted to keep the content of the images folder (inside WebContetnt folder) out of source control.
So, I went into my project folder and modified the .gitignore file adding /WebContent/img/*.
This does not change anything in eclipse.
So, I used an alternate approach. Project > Team > Git > Ignore. This works and the question
mark image on the img folder icon vanishes.
I am not able to understand why my manual change does not work and also how eclipse suddenly
put it into source control. Please help me to understand.
Thanks.

To ignore contents of the folder you have to have a folder name + forward slash and no asterisk: WebContent/img/
And, as #janos noted, don't forget to refresh your project/repository after manual change of your .gitignore file

Related

How to ignore files via GUI in Gitkraken?

I come from SourceTree to board the GitKraken hype train. It has always been pretty easy to ignore files within ST. Just right-click on a file in the unstaged container and you've all the options. You can ignore the files directly, each file beneath a specific folder etc. (so, all the .gitignore stuff from within the GUI =)).
However, I can't find a similar feature in GitKraken. Does anybody know how I can ignore files via the GUI of GitKraken?
Please note: This is not a git question. I absolutely know in depth how ignoring files in Git work. But that's not the topic whatsoever. This is just a trivial GitKraken support question.
Currently there isn't an option to ignore a file through the GitKraken GUI.
If you check their post on twitter this is planned to be implemented soon and it will be in their release notes once this is completed.
UPDATE (26.01.2017.):
Version 2.0.0 brings the .gitignore option to the list of functionalities. You can now select a file or folder in the file staging area, and add to the .gitignore file on the fly. Right-click and select Ignore. From there, you can:
Add that specific file to .gitignore
Add all files with that file extension to .gitignore
Add all files in the same folder as the selected file to
.gitignore
(If selecting a folder) add that folder to the .gitignore

Eclipse Team Synchronizing View: How to remove unversioned items in outgoing changes?

While viewing the outgoing changes in Eclipse Team Synchronization(Subclipse), I am able to see the unversioned files also, like the generated class files, build folders, etc, which I do not want to see in this view. I dont want to add it to svn:ignore, since I have to do it manually for all the additional folders generated.
Is there any setting to change this to show only versioned files in this mode always?
Tortoise SVN client shows this option while committing, to show only versioned files. I am looking for such an option in Subclipse Team Synchronization view. Thanks in advance.
eclipse_outgoing_view
You should svn:ignore build folders.
Otherwise it's only a question of time until you or your colleague checks in the build folder
You should use svn:ignore, and note that once you do for a folder, all child folders are automatically ignored. In your example, if the build folder were ignored then everything inside it would automatically be ignored. It looks like your build folder has already been added to repository though, so maybe you can ignore the dist folder inside bin.

Egit listed every file that was built in compare view after I run Ant to build the project

Guys:
I would know how to set up Eclipse so I can compare with my local project with head revision on remote server with EGit. Here is the situation: I imported a new project with Egit smoothly. However, I want to compare with head revision or a commit with my local project after I did some change. To my surprise, the eclipse listed every file in Build directory after I run ant to build the project. The file that I really updated was not even listed in compare with view. I attach a screen snapshot to show what is going on. Can anybody tell me how to set up compare with in eclipse?
Thanks a lot!
Sam
I faced the same issue.
Delete the .gitignore file (if present)in your directory. Refresh
Add files to Index.
The .gitignore specifies the pattern which will decide whether to ignore a path.
Note: Deleting the .gitignore is harmles and will show each and every change made in your repository including whitespaces.
Adding files to Index: will check for the new files and changes made, stages these files.
Thank You. I hope this will be helpful to you.

How to add to git index with JBoss Tools

I've created a new project on OpenShift and cloned it locally. But now i'm having problems adding new files and folders to git index. Right click on the new folder (with files and subfolders) in project explorer and choosing Team -> Add to Index, changes nothing. And if i try to commit, Eclipse says that there aren't any changes... (If i only update existing files, everything seems to be fine).
What could be the problem?
Make sure that you have the "Git Staging" view open, and right click on the file in your Unstaged Changes and Select "Add to Index", also make sure that the file is not empty, it did not show up as a staged file until after i added some content to it, even after I had added the file. (Can't add empty files or directories to git with EGit maybe?)
this sounds like EGit missing new files. I'd love to know a bit more about your setup:
Where did you clone to, where is your Eclipse workspace?
To make sure your git setup is right I suggest that you do the same with the git command line:
cd [git-repo]
git status
Git status should list the new files and tell us that they're not added yet. If they get listed, then we know that your git is set up right and we can get back to Eclipse to try to figure out what's wrong with it.
Found out what the problem was (kind of stupid though). The folder that contained new content was listed in .gitignore ... but that file isn't accessible through eclipse, i had to look it up on filesystem. I also don't have a clue, how that line came to .gitignore...
Well, that's it...

What Eclipse metadata files should be in the repository?

I'm working on a new project with a full ANT build. I use eclipse to write my code, and I would like others to be able to check out the project to have a full working eclipse workspace. I do not want to have specific user settings committed though.
What files and directories should I have in source control?
(I'd rather not just go grab a plugin - I prefer more control over what goes in the repository)
We just put .project and .classpath in our repository, and that's sufficient to make it work "out of the box" for new developers. I'd like to have other stuff (run configurations come to mind), but haven't figured out how.
We use Subversion, so I put these files in a separate directory and defined svn:externals on that directory to point to the actual code, leaving it unpolluted by IDE-specific files.
Per request in the comments, here are the external that we use. Nothing complicated going on here:
Properties on 'svn://dev/trunk/IDEs/eclipse/runtime':
svn:ignore
bin
.fbprefs
cobertura.ser
.settings
svn:externals
lib/bin svn://dev/trunk/lib/bin
runtime svn://dev/trunk/runtime