Git

Problems with git commit autosigning on mac

If you’ve enabled GPG signing for Git commits on macOS, you might occasionally encounter this frustrating error message: ❯ git commit -m 'Test' error: gpg failed to sign the data fatal: failed to write commit object This happens when the GPG agent gets stuck or isn’t properly configured. Here’s how to fix it. Quik fix If you need a quick solution, you can restart the GPG agent using the following command: pkill -9 gpg-agent && export GPG_TTY=$(tty) This will...

How to Gitconfig

A practical Guide to managing multiple git Users

When working with Git, having an organized and efficient configuration can make a world of difference. Over the past few days, I’ve been diving deep into my .gitconfig, tweaking it to suit both my personal and professional needs. In this article, I’ll walk you through the steps I took to set up a clean and flexible Git configuration, including managing multiple users, enabling GPG signing, and using a global .gitignore for a smoother development experience. Whether you’re just starting...