So here is a small script that does exactly that. It goes over all your .cpp and .h file and will add the header based on the list of authors as well as the first commit on that particular file. #!/usr/bin/env bash # SPDX-FileCopyrightText: 2023 Carl Schwan <carl@carlschwan.eu> # SPDX-License-Identifier: MIT for file in **/*.cpp **/*.h ; do year = ` git log --format = "format:%ci" --reverse $file | head -n1 | cut -d "-" -f 1 ` git shortlog -n -e -s -- $file | cut -f 2 | while IFS = read -r author do reuse annotate --copyright " $author " --year " $year " --license "GPL-2.0-or-later" $file done done