I am new to Git and I'm having a lot of difficulty figuring this out.
We are using JBoss Application Server 5.1 in Eclipse. Some people have downloaded the JBoss Tools Eclipse Plugin so they can add the JBoss 5.1 Runtime Server as "JBoss AS 5.1" to their Eclipse workspace. This results in a classpath line that looks like this:
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 5.1 Runtime"/>
Other people do not see the value of downloading and installing the JBoss Tools plugin, so they just use Eclipse's built-in JBoss server adapter, which only goes up to JBoss v.50. They have a classpath line that looks like this:
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.generic.runtimeTarget/JBoss v5.0"/>
I don't want to add .classpath to my .gitignore file because:
So far we have just tried each modifying our .classpath files in our working directory but never committing. This is annoying not only because they keep showing up in our git status, but sometimes they will not allow us to merge or switch branches in Egit - complaining about uncommitted changes.
I've read on the internet about using Classpath Variables instead, but I cannot seem to find the correct path to the JBoss libraries at all. The classpath lines I listed above seem to point to somewhere inside the Eclipse/plugins directory somewhere? But I can't find it. I also tried pointing some variables to my C:\jboss-5.1.0.GA\ directory, but that does not seem to do anything either.
Is there a way to just leave the .classpath file inside the repository as it is now in its current state, so that new users who clone the repository still get them, but then just ignore all future changes any developers make to the files?
An easy, once-per-developer solution from Pagebakers and git is
git update-index --assume-unchanged <file>
To undo it, just use
git update-index --no-assume-unchanged <file>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With