Oops. I meant to add a file as a binary file but did not. Can I fix this?

By Alvin J. Alexander, devdaily.com

Yes, assuming the file is named myfile.zip, you can do this to get CVS to treat it as a binary file:

  cvs admin -kb myfile.zip

After this is done, commit a new version of the binary file, and all should be well. CVS will know that it is now a binary file.



After running into this problem again yesterday, and re-reading my note, I really need to emphasize the "commit a new version of the binary file" portion of that last paragraph.

Based on my experience yesterday it looks like the file you initially checked in is worthless. Yesterday I imported a project into CVS, including a group of jar files, and then checked my project out on another workstation. The jar files on that workstation were corrupt. By following my instructions (above) I was able to get good files into the repository ... I just didn't emphasize the part about putting new, good files in place of the bad, corrupt files.


devdaily logo