Repairing windshield cracks is about as high on the do-it-yourself scale as can be seriously considered. There are definite limits beyond which the job should be turned over to pros, or the windshield should be replaced.
Here are the conditions under which repairs are feasible:
Mind you, even if all these conditions are met, it may still be better to replace rather than repair. If the crack is in the "acute" area, you're better off replacing. Or if you wish a completely invisible fix — better to replace.
The actual repair is not that difficult. The windshield must be clean — but the crack itself must be covered during the cleaning process so that contamination doesn't get into it. A "tip" or "peg" is created at the end of the crack — an artificial chip, which is repaired by the normal chip process. This is to prevent the crack extending itself after the repair — which could happen if there's even a tiny bit of crack left unrepaired. (One company advertises that its process for 6" or 8" cracks doesn't need tipping).
Then a special resin is injected into the crack, starting at the impact point, moving towards the tip. This is done over until all gaps have been filled in and there don't appear to be any remains of the crack. Resin is used for both the tip and the crack, but the tip resin is of a different, not-so-strong compound; it is more viscous (easier-flowing) because it has to get into irregular shapes. The crack resin is very strong — because it has to repair much more serious damage — and so is harder to apply.
The final step is to cure the resin with an ultraviolet lamp. Bright sunlight would do but it takes longer and won't do as good a job. Curing lamps are easily available and don't cost that much.
As described, crack repair is quite straightforward. And so it is — with the proper equipment (especially the injector and the resins) and experience. Best to practice before doing real-world repairs!