Failure when adding a tracked file in an ignored directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have an untracked directory, but inside this directory I have some
files that I do want to track. I added these particular files with git
add -f, and committed them successfully.

The problem is that every time I update any of these files, I must use
git add -f, although the files are already tracked.

Example:
$ git init
$ mkdir foo
$ touch foo/bar
$ git add foo/bar
$ echo /foo > .gitignore
$ git add foo/bar
The following paths are ignored by one of your .gitignore files:
foo
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"

Is this intentional? I think it should only warn and fail for *newly
added* files, but succeed silently for tracked files.

- Orgad



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux