Re: How to ignore deleted files

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

 



Dear Jakub!

Jakub Narebski schrieb:
>> our git repository contains a number of .tar.gz - files that are
>> automatically extracted and then deleted during the build process.
>> Unfortunately, commiting any changes after that step will mark those
>> files as deleted and try to commit that to the repository. Is there any
>> way to tell git to ignore those files automatically (apart from changing
>> our build process not to use or not to delete those files)?
>>     
>
> I don't quite understand: are those .tar.gz files stored in _source_
> repository? That would be a bit strange...
>
>   

I absolutetly agree that it's strange. The main reason for this is that
we have some collections of data files (some of them pretty large) that
can be compressed pretty effectively. At compilation time, it is decided
if the files are needed or not. If so, they are extracted. In the end,
the .tar.gz files are deleted since they are no longer needed. In
addition, once a user obtained a checkout, the whole thing is supposed
to work without a further net connection, so downloading the files
during build is not really an option.

> I guess that you have tried adding "*.tar.gz" to either .gitignore or
> .git/info/excludes file?
>   
I did, but as far as I understand it, these only work for untracked
files, and the files themselves are tracked (from time to time, they
change and the idea was to track those changes). Or am I missing
something here?

btw: I just noted that

git-commit $(git-ls-files -m --exclude-from=.git/info/exclude)

with the correct entries in the exclude file seems to do pretty much
what I want it to do, namely finding all modifications apart from those
mentioned in the exclude file and commiting them. Would this be a sane
strategy to handle things before we can maybe some day re-structure our
build process?


Thanks a lot for your help!

Andreas Hildebrandt
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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