DEV Community

Evan Hildreth
Evan Hildreth

Posted on • Originally published at oddevan.com on

Retroactively Sign Git Commits

It’s a classic situation. You’re contributing to a project, filed your pull request, and gotten it approved by your peers. You’re all ready to merge your code and add your humble contribution to the project when, out of nowhere, GitHub gives you this:

GitHub error: Merging is blocked: The base branch requires all commits to be signed.

How do you go about doing this, especially when you’ve already committed your work and pushed it to the server? How do you retroactively sign your Git commits? We’ll do this in six steps:

  1. Gather Information
  2. Install GPG
  3. Create or use a key
  4. Set up Git to sign commits using GPG
  5. Rebase your commits
  6. Overwrite your branch with your newly signed commits

There’s a lot to unpack, so we’re going to need six steps. Also, these instructions are for macOS; Windows and Linux users may have different commands.

Read more on WebDevStudios.com »

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

Playwright CLI Flags Tutorial

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • 0:56 --last-failed: Zero in on just the tests that failed in your previous run
  • 2:34 --only-changed: Test only the spec files you've modified in git
  • 4:27 --repeat-each: Run tests multiple times to catch flaky behavior before it reaches production
  • 5:15 --forbid-only: Prevent accidental test.only commits from breaking your CI pipeline
  • 5:51 --ui --headed --workers 1: Debug visually with browser windows and sequential test execution

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Click on any timestamp above to jump directly to that section in the tutorial!

Watch Full Video 📹️

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay