cscs
13
For just the headers:
sudo pacman -Syu $(ls /boot | awk -F "-" '/^linux/ { print $1"-headers" }')
For git and dkms and base-devel too:
sudo pacman -Syu git base-devel dkms $(ls /boot | awk -F "-" '/^linux/ { print $1"-headers" }')
See any other related thread, ex: