Re: [git-users] How to save file's first commit, but ignore all further changes to this file?

2016-01-06 Thread Gergely Polonkai
There is an assume-unchanged option you can set with git-update-index, but that's for your local repository only; it is possible that other developers will overwrite the file. If you tell us some more details, the list may give you better answers or alternatives, though. Best, Gergely On 6 Jan

Re: [git-users] How to save file's first commit, but ignore all further changes to this file?

2016-01-06 Thread Tikhon Tarnavsky
I have some "data batches" inside my project. These batches are in a binary proprietary format, and I don't need to save their content into the repo. User can add a files to a batch using an external binary utility. But every batch should have some "batch header" files (binary also, but very small

Re: [git-users] How to save file's first commit, but ignore all further changes to this file?

2016-01-06 Thread Chris Stone
I think you could check in the "header files" as you want them to be then add the files to your .gitignore that way any changes made to those header files would not be committed to the repo. Another option I think would work which might be the better solution is to use a git hook to copy the

Re: [git-users] How to save file's first commit, but ignore all further changes to this file?

2016-01-06 Thread Tikhon Tarnavsky
Thank you. I tried to add these files to .gitignore, but "git status" shows them as "modified" or "deleted" anyway. Using git hook is a good idea too. How can I create a hook which will run after clone and after each pull (just in case I added some new batches)? 2016-01-06 22:34 GMT+02:00 Chris

Re: [git-users] How to save file's first commit, but ignore all further changes to this file?

2016-01-06 Thread Philip Oakley
How about (given the comment about it being a template): create an orphan branch add just that file to the branch and commit. Tag the commit delete the branch get folks to 'git checkout tag -- file'. Perhaps even make that an alias. Once it is in the repo it's fixed, unchanged forever! [or