as mentioned in docs the commit will include everything in assets even if it is included in .gitignore.
you can add an option to ignore a file's contents like that
["@semantic-release/git", {
assets: ["**/*.*"],
ignoreFile= '.gitignore'
}]
this approach is used by many tools tile eslint and prettier
also, it is a good idea to add an option to include changed files only