branch - Git: Dealing with .class files and other compiled objects -
lets have couple branches different code: brancha , branchb. assume i'm on brancha , run build. suppose build dumps .class files , other compiled objects directories within work tree. when run diff, see directories have changed because have new compiled objects within.
if switch branchb , deploy code, i'm deploying objects compiled brancha's code base, since git maintained floating changes (new compiled objects) across branch switch. mistake.
there few ways avoid this, 1 being cleaning non-versioned files whenever switch branches, there more fool-proof way of taking care of issue. i'd rather not put compiled object version control.
what do
- use .gitignore exclude compiled files repo
- make clean , compile part of deployment process.
Comments
Post a Comment