# getting started with git

3 messages from 2008-11-14 to 2008-11-14. Participants: Ivan Senji, Tor Arvid Lund, Lars Hoss.
Thread: https://gitlist.dev/t/16325

## Ivan Senji, 2008-11-14 10:16

Subject: getting started with git
Message-ID: <20497802.post@talk.nabble.com>
URL: https://gitlist.dev/e/20497802.post%40talk.nabble.com

```

Hello everyone!

I started using git recently to manage my personal projects and I really
like it. I develop on several different locations and have a little problem
that i couldn't find a way to solve.

On each location that i develop some project and configuration files are
different. But i would like them to be in the repository as a starting point
when checking out a project (example: opening a project on a dfferent OS in
eclipse... eclipse will find an error in the path to jdk and ask me to fix
that error by selecting a different jdk).

How to achieve that these files are in the repository but that any further
changes to them are not commited (or are commited localy but not pushed to a
remote repository)?

Is that even possible?

Thanks!
-- 
View this message in context: http://www.nabble.com/getting-started-with-git-tp20497802p20497802.html
Sent from the git mailing list archive at Nabble.com.

```

## Tor Arvid Lund, 2008-11-14 12:56

Subject: Re: getting started with git
Message-ID: <1a6be5fa0811140456j10fd8703w74e485571e3c70af@mail.gmail.com>
URL: https://gitlist.dev/e/1a6be5fa0811140456j10fd8703w74e485571e3c70af%40mail.gmail.com
In-Reply-To: <20497802.post@talk.nabble.com>

```
On Fri, Nov 14, 2008 at 11:16 AM, Ivan Senji <ivan.senji@gmail.com> wrote:
> On each location that i develop some project and configuration files are
> different. But i would like them to be in the repository as a starting point
> when checking out a project (example: opening a project on a dfferent OS in
> eclipse... eclipse will find an error in the path to jdk and ask me to fix
> that error by selecting a different jdk).
>
> How to achieve that these files are in the repository but that any further
> changes to them are not commited (or are commited localy but not pushed to a
> remote repository)?

Hi,

Well, if it were me, I think I would commit that eclipse config file
under a different name... Say, ".classpath.defaults" instead of
".classpath". Then your README file could tell your users to start by
copying the .classpath.defaults to .classpath, and update its contents
as necessary. Put .classpath in your .gitignore file, so it won't be
committed to the repository.

-Tor Arvid-

```

## Lars Hoss, 2008-11-14 14:29

Subject: Re: getting started with git
Message-ID: <fc0c0c65f69439eede2e4565c5f930fd.squirrel@webmail.highteq.net>
URL: https://gitlist.dev/e/fc0c0c65f69439eede2e4565c5f930fd.squirrel%40webmail.highteq.net
In-Reply-To: <1a6be5fa0811140456j10fd8703w74e485571e3c70af@mail.gmail.com>

```
>
> Well, if it were me, I think I would commit that eclipse config file
> under a different name... Say, ".classpath.defaults" instead of
> ".classpath". Then your README file could tell your users to start by
> copying the .classpath.defaults to .classpath, and update its contents
> as necessary. Put .classpath in your .gitignore file, so it won't be
> committed to the repository.

Template files (x.default) is a good idea. But regarding your example
with .classpath: it's safe to add it to git since it's developer
independent and project oriented. Therefore it's useful for every
developer in the project who uses eclipse :-)

Yours,
Lars

```
