Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] I can't ignore .gitignore

Hi Christoph,

I would be willing to put in a feature request for option #1 below (don't create .gitignore in nonempty directories).  What do you think?

Thanks,
Dave
On Jul 8, 2013, at 9:10 PM, Roland Schulz <roland@xxxxxxx> wrote:

Hi,

the reason we add .gitignore to folders is that git doesn't track folders and thus doesn't create empty folders. Some (not very smart) build systems require empty folders to exist for the build to work. It wouldn't be necessary to create .gitignore files for non-empty folders, it could be configurable whether it is done, and it could be a different filename (or configurable). Currently none of those three options are implemented. If you would like one of those options please open a feature request. As a workaround you can add .gitignore to the top-level .gitingore file. That way all the .gitignore files are ignored by git. The only disadvantage is that if you have some custom .gitignore file you do want to add you need to use "git add -f" to force adding a ignored file.

Roland

On Mon, Jul 8, 2013 at 8:07 PM, Dr. David E Hudak <dhudak@xxxxxxx> wrote:
Hi Christoph,

I have not gotten to this problem yet, but I just tested it and can confirm the following:
        1.  a .gitignore is put in the top level project directory that includes /.ptp_sync
        2.  a .gitignore is put in all of the subdirectories of the project.  These are all empty.

The topic of putting the .gitignore under version control is well-discussed in the broader community:
http://stackoverflow.com/questions/5765645/should-you-commit-gitignore-into-the-git-repos

Egit's convention seems to be to use .gitignore to manage Eclipse metadata files:
http://www.vogella.com/articles/EGit/article.html#firstegit_gitignore

Therefore, I have begun adding the top-level .gitignore to my repositories and adding the /.settings, .cproject, .project to it.

The .gitignore files in the subdirectories seem to serve no purpose, so I would be OK with them not being created.

Thanks,
Dave
On Jul 8, 2013, at 4:19 PM, Christoph Pospiech <Christoph.Pospiech@xxxxxxxxxx> wrote:

> Hi,
>
> I thought the following feature would go away silently when moving from Iuno
> to Kepler - it didn't. PTP still adds an empty file .gitignore into every
> directory prior to initialize PTP synchronization.
>
> Despite its name, .gitignore neither is invisible nor ignored by git. Instead,
> it produces the following annoying side effects.
>
> With command line git, each .gitignore is treated as a file that is currently
> not tracked. If the project has lots of subdirectories, this floods the output
> of e.g. git status with .gitignore listings which makes it hard to read.
>
> With Egit, each directory in the project explorer is marked with '>', if this
> directory contains untracked or changed files. This is a nice feature that can
> quickly guide you to the files that need to be committed. Unfortunately,
> .gitignore also is treated as untracked directory content, hence each
> directory is marked with '>' regardless as soon as PTP synchronization has
> been set up.
>
> What was the reason for adding this file in the first place ? I darkly remember
> an answer given in this mailing list more than a year ago. I remember that
> .gitignore was used to enforce replication of (otherwise) empty directories
> (as they are no longer empty, when they contain .gitignore). If this is still
> true and if this is the only reason, would it be possible to restrict the use
> of .gitignore to empty directories ?
>
> Or do we need a non-void .gitignore that instructs git to ignore any
> .gitignore  ? :-)
> --
>
> Mit freundlichen Grüßen / Kind regards
>
> Dr. Christoph Pospiech
> High Performance & Parallel Computing
> Phone: +49-351 86269826
> Mobile: +49-171-765 5871
> E-Mail: christoph.pospiech@xxxxxxxxxx
> -------------------------------------------------------------------------------------------------------------------------------------------
> IBM Deutschland GmbH / Vorsitzender des Aufsichtsrats: Martin Jetter
> Geschäftsführung: Martina Koederitz (Vorsitzende), Reinhard Reschke, Dieter
> Scholz, Gregor Pillen, Joachim Heel, Christian Noll
> Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB
> 14562 / WEEE-Reg.-Nr. DE 99369940
>
> _______________________________________________
> ptp-user mailing list
> ptp-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-user

---
David E. Hudak, Ph.D.          dhudak@xxxxxxx
Senior Research Scientist
Ohio Supercomputer Center
http://www.osc.edu










_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user







--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user

---
David E. Hudak, Ph.D.          dhudak@xxxxxxx
Senior Research Scientist
Ohio Supercomputer Center











Back to the top