As noted in other answers, known_hosts does not have support for IP address ranges. It does, however, support wildcards. Of course wild-cards aren't quite the same thing so you need to be really careful about how you use them in IP addresses, but in the particular case of Github this can be done safely.
The situation seems to have gotten simpler since the question was asked. According to Github's official documentation there is only one IP address range in use (at least as far as IPv4 goes). This is the 126.96.36.199/22 range. That makes for 1020 possible IP addresses that conveniently span the entire possible range for the last octet in just four different C blocks.
man 8 sshd, this is what we have to work with in known_hosts:
Hostnames is a comma-separated list of patterns (
*' and?' act as wildcards); each pattern in turn is matched against the canonical host name (when authenticating a client) or against the user-supplied name (when authenticating a server). A pattern may also be preceded by
!' to indicate negation: if the host name matches a negated pattern, it is not accepted (by that line) even if it matched another pattern on the line. A hostname or address may optionally be enclosed within[' and
]' brackets then followed by:' and a non-standard port number.
Using this info, we can construct an entry using the * wildcard for the last octet that matches all possible Github endpoints (and ONLY those endpoints) like so:
github.com,192.30.252.*,192.30.253.*,192.30.254.*,192.30.255.* ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
If the IP range you needed to construct did not fill a full C block and thus all possible values for an octet, it would be impossible to use wildcards for such an accurate match.