简体   繁体   中英

Uploading static executable to GIT project makes the file corrupted

I have a git project that has a number of python, js, etc files in it. One of the files is a compiled C program ('program.static') that runs fine in my project.

However, when I commit that file to git (its rather small, like 12 MB) and then try to pull it down to a new machine (or even the same machine after wiping that local copy of the git project) the file no longer works as an executable.

On OSX, if I try to run the static file, (eg ./program.static ) it will just immediately kill the process. If I copy/paste a local copy of program.static to the directory, it works fine.

How do you protect static files like this during the git commit/pull process?

Changing the.attributes to include the.static file format correctly preserves functionality of the file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM