kernel.org has a public (read-only) git repository that you can clone. It also has tags for each kernel version, so you can check the specific version:
# Clone the kernel to your local machine $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git $ cd linux-stable
Now the linux-stable directory will have the desired kernel version.
(I know that you said v3.18.1 does not exist as a tag, but it does)
Edit : the asker says that he used github relay from Torvalds, so he could not find the tag for 3.18.1. This is expected because github relay in Torvalds contains only tags for release candidates.
The responder requests a small revision (.1 in 3.18.1), so he needs to get this from https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/
source share