git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: grizlyk <grizlyk1@yandex.ru>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Pro Git book: concerning data lost due to ".gitignore"
Date: Sat, 10 Jul 2021 07:52:40 +0300	[thread overview]
Message-ID: <4458411625892760@myt6-ab88f6e23eb0.qloud-c.yandex.net> (raw)
In-Reply-To: <87a6o459bh.fsf@evledraar.gmail.com>

hi

> On Sat, Jun 05 2021
> It's way too common of a pattern to e.g. have a *.o file made from a
> corresponding *.[ch] file(s) in the same directory.

The patterns were common for old times (before VCSes was involved). To deal with temporary files (like .o), generic OS tools like "make remove_compiled" can help to clean directory before stage. To keep derivative persistent files (like the same .o) separated directory can be used.

> git already does a good job of supporting it. 

Sure, the light message: "There are ignored files (%u<number of files>) not placed into repo.\n\t(use git status --ignored to view)"; will improve the activity. Otherwise some files somethimes will not be placed into repo unexpectedly for user. 

> You'd e.g. compile all your 
> assets outside of the repo via your build system, and just not have
> anything in .gitignore.

Do you suggest to copy desired src files into separated repo directory (the repo directory placed under VCS control) by generic OS tools (i.e. by cp command) and stage the separated directory? 

If yes; for the first it is copies of all src files; for the second we could lost some src files due to the possible wrong copy patterns (the same reasons as by wrong .gitignore patterns). 
So, to explicitly create output files into separated directory and to implicitly include all files in src directory into repo is only reliable way to keep commits without data lost (the way will sometimes include extra output files into repo). 

to explicitly create output files into separated directory is responsibility of translators and makefiles. 

Best regards,
Maksim.

  reply	other threads:[~2021-07-10  4:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 23:12 Pro Git book: concerning data lost due to ".gitignore" grizlyk
2021-06-05 20:39 ` Ævar Arnfjörð Bjarmason
2021-07-10  4:52   ` grizlyk [this message]
2021-07-10  8:23     ` Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4458411625892760@myt6-ab88f6e23eb0.qloud-c.yandex.net \
    --to=grizlyk1@yandex.ru \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).