git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: llucianf <llucianf@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: gitignore design
Date: Fri, 29 Jul 2011 05:57:02 -0700 (PDT)	[thread overview]
Message-ID: <m3tya5qm86.fsf@localhost.localdomain> (raw)
In-Reply-To: <1311943481799-6633412.post@n2.nabble.com>

llucianf <llucianf@gmail.com> writes:

> im sure cvs doesnt require you to remove files from repo in order to ignore
> them. i used cvs for years and its ingonre policy is simple and effective.
> you just put the files/patterns into ignore file and things happen aka they
> are ignored.

_Untracked_ files are ignored.  Tracked files are not, even with CVS.

  $ echo file2.txt >>.cvsignore
  $ echo "3 line"  >>file2.txt

Now 'cvs status' shows file as 

  File: file2.txt         Status: Locally Modified

and 'cvs diff' shows changes.

CVS 1.11.19

[And damn, how hard it was to check this in CVS as compared to
 checking similar things with Git].

> with this very intelligent git this simple thing is not so simple. of course
> there are workarounds (like the template example you gave) but they are
> clumsy.

They are correct and better solutions than ignoring changes.

Ignoring changes to tracked files is much more rare than having broad
ignore file, and tracking some files that match ignore patterns (but
note that you must use "git add --force" to add/track ignored file).

> im just trying to understand why git ignore mechanism cant just read the
> .gitignore file and obey to those ignore rules without asking you to do
> fancy voodoo operations such removing those files from repo.

Please read carefully: I mentioned 'ASSUME-UNCHANGED' mechanism in
both of my posts, haven't I?

-- 
Jakub Narębski

  reply	other threads:[~2011-07-29 12:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29 10:20 gitignore design llucianf
2011-07-29 11:51 ` Ferry Huberts
2011-07-29 12:01   ` llucianf
2011-07-29 12:08     ` Ferry Huberts
2011-07-29 12:16       ` llucianf
2011-07-29 12:27         ` Jakub Narebski
2011-07-29 12:44           ` llucianf
2011-07-29 12:57             ` Jakub Narebski [this message]
2011-07-29 14:01               ` Ferry Huberts
2011-07-29 12:19     ` Jakub Narebski
2011-07-29 12:58       ` Johannes Sixt
2011-07-29 13:19         ` Jakub Narebski
2011-07-29 13:31           ` Johannes Sixt
2011-07-29 21:39             ` Jakub Narebski
2011-07-30  3:10               ` Nguyen Thai Ngoc Duy
2011-07-30  6:45                 ` Piotr Krukowiecki
2011-07-30 13:22                   ` Nguyen Thai Ngoc Duy
2011-07-30 15:52                     ` Piotr Krukowiecki
2011-07-30 16:01                     ` Clemens Buchacher
2011-07-29 16:44 ` Philip Oakley

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

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

  git send-email \
    --in-reply-to=m3tya5qm86.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=llucianf@gmail.com \
    /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.
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 NNTP newsgroup(s).