Skip to main content

31 posts tagged with "git"

git tag description

View All Tags

How to sign your commits with a GPG key so that "Verified" badge appears next to your name on GitHub?

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

That "Verified" badge on GitHub isn't just for show-it's a cryptographic guarantee that the code actually came from you and hasn't been tampered with. Without it, anyone can technically spoof your name and email in a Git commit.

By using GPG (GNU Privacy Guard), you "seal" your commits with a private key that only you possess. GitHub then uses your public key to verify that seal.

Why Git Says 'No Existing Author Found' and How to Fix It

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

This error usually pops up when you're trying to use the --author flag during a commit or a rebase, and Git is failing its "detective work."

Unlike a simple text label, the --author flag triggers a search. Git tries to find a match in your existing history or your configuration. If your search string is too vague, has a typo, or doesn't match the required pattern, Git throws its hands up and says: fatal: No existing author found with 'XYZ'.

The Time Traveler’s Guide: How to Change Git Commit Authors

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Rewriting history in Git is a bit like time travel: it's powerful, but if you're not careful, you can create a messy alternate timeline. Since Git commits are cryptographically linked to their parent, changing an author changes the commit hash, which means you are technically replacing old commits with brand-new ones.

How to Find the Author of a Git Commit (with Email)

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Finding the person behind a line of code is one of the most common tasks in Git—whether you're giving credit, asking for clarification, or (let’s be honest) finding out who broke the build.

In Git, every commit stores two distinct identities: the Author (who wrote the code) and the Committer (who put it into the repository). Usually, they are the same person, but they can differ during rebases or cherry-picks.

SOLVED - fatal: Not possible to fast-forward, aborting

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

This error is Git’s way of saying: "I can't just stack your new commits on top of the remote ones because the history has split."

In technical terms, your local history and the remote history have diverged. You have commits that the server doesn't, and the server has commits that you don't. Git is refusing to "Fast-Forward" (which essentially means "just move the pointer forward") because there is nowhere straightforward to move it to.

Here are 5 ways to solve this, ranked from "Standard Practice" to "Nuclear Option."

Enable "Last Updated" Docusaurus Dates on Vercel

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Docusaurus provides a powerful feature that displays the last updated time and last updated author for every blog post and documentation page.
However, when deploying a Docusaurus website on Vercel, many developers encounter the same confusing issue:

Every page shows the exact same “last updated” date — or no date at all.

This guide explains precisely why this happens and the exact configuration you must enable on Vercel to make Docusaurus timestamps work correctly.

Git Detected Dubious Ownership in Repository Error

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

The Git error message "detected dubious ownership in repository" is a modern security feature introduced in Git version 2.35.2 (and backported to several older versions) [1].

This error occurs when you attempt to run Git commands (like git status, git pull, or git commit) inside a repository whose files are owned by a different user ID (UID) than the one currently executing the Git command.

The primary purpose is to prevent privilege escalation or arbitrary code execution when working on shared systems or filesystems that allow one user to create a malicious .git/hooks file that another user (especially one with higher privileges) might unknowingly execute [2].

Check history of specific line in vscode

· 4 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

You can check the history of a specific line in VS Code using the built-in Git Blame feature or the Timeline view. For a much more powerful experience, the free GitLens extension is highly recommended.

How to squash commits

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Squashing commits is a common Git operation that combines multiple commits into a single, cleaner commit. This is crucial for keeping your branch history tidy before merging into a main branch (like main or master), making the project history easier to read and revert [1].

The primary tool for squashing commits is interactive rebase (git rebase -i).

Git: Discard All Local Changes and Get a Fresh Copy from GitHub

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

A common and reliable way to get a fresh copy from a GitHub repository, while preserving specific local files like .gitignore, is to use a combination of git reset and git clean. This approach ensures your local branch exactly mirrors the remote branch, without leaving behind any untracked or unwanted files.