Skip to content

Instantly share code, notes, and snippets.

@dolmen
Created May 12, 2026 16:38
Show Gist options
  • Select an option

  • Save dolmen/799718cf5d011faf88cdc557c14f68ef to your computer and use it in GitHub Desktop.

Select an option

Save dolmen/799718cf5d011faf88cdc557c14f68ef to your computer and use it in GitHub Desktop.
git-fix-jules-commit

Script to fix Co-authored-by lines produced by Google Jules to match my Git config.

#!/usr/bin/env bash
# Jules, by Google, isn't able to properly apply my instructions about co-authorship: it use my GitHub public
# email instead of the email I want to use.
# So this script allows to fix the Co-authored-by that appears in commit messages to match my git config.
#
# Author: Olivier Mengué
GIT_EDITOR='sed -i "" -e "s/Co-authored-by: .*/Co-authored-by: '"$(git config user.name) <$(git config user.email)"'>/"' \
git commit --amend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment