I'm using git to sync to phonegap while testing on the phone's native browser. As such I have the following line:
var isPhoneGap = false;
Obviously I change this when building, but is there any way I can set up git to ignore this one line or do I have to go and put it in its own file and ignore it that way?
I'm using Gitx and the terminal on OSX 10.6.
Gitx should let you commit or ignore individual lines (you may know that already), but you'd have to do that every time you commit. I think it would be better to have a config file per deployment target (you can version those), and some runtime parameter for however you are starting the server (like
./myserver --config=whatever.js
).Nope. You can only ignore individual files (and more) since the lines in .gitignore matches file names and not file content. You have already mentioned the solution to this, i.e. ignore a single file that contains that content you want to ignore.