Skip to main content

26 posts tagged with "git"

git tag description

View All Tags

Conventional Commits Cheat Sheet & Guide

6 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Conventional Commits is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history, which makes it easier for automated tools to parse and for humans to understand (1).

Git Merging: How to Resolve Conflicts, Choose Strategies, and Keep Clean History

11 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

The dreaded CONFLICT (content): Merge conflict in file.txt. For many developers, seeing this message triggers an immediate spike in heart rate. It feels like you broke something.

Take a deep breath. You didn't break anything. A merge conflict is simply Git throwing its hands up and saying, "Hey, two people changed the exact same line of code, and I am not smart enough to guess which one is right. I need a human."

Here is how to read the Matrix, resolve the conflict, and get on with your day without losing your mind.

Git fetch vs git fetch origin: whats the difference?

5 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

When you are typing away in your terminal, git fetch and git fetch origin probably feel exactly the same. In fact, if you only ever work on standard, single-team projects, you might go your entire career without realizing there is a difference at all.

However, Git is highly configurable. The moment you step into open-source development or complex team architectures, that little missing word (origin) suddenly completely changes how Git behaves.

Here is the candid truth about what Git is actually doing behind the scenes.

How to Find a Bug with `git bisect` (Binary Search Debugging)

5 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Finding a bug is like detective work-except the crime scene is your code, and the suspect is one of your last 200 commits. You know the code worked last week, and you know it's broken now, but finding the exact moment it failed can take hours of manual checking.

Enter git bisect. It uses a binary search algorithm to find the offending commit with mathematical efficiency. Instead of checking every commit, it cuts the search area in half every single time.

Use `git worktree` for Hotfixes: A Better Alternative to Stash

6 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

We have all been there: you are deep in the zone, half-way through building a complex new feature, and your terminal is full of uncommitted changes. Suddenly, you get a message from your team: "Critical bug in production! We need a hotfix right now!"

The traditional response is to use git stash, switch to main, fix the bug, and then try to un-stash your messy feature branch later. But if you have complex dependencies (like node_modules or .venv) or untracked files, stashing can lead to absolute chaos.

This is where git worktree comes in. It is the professional's secret weapon for parallel development.

How to Fix 'fatal: cannot delete branch used by worktree' in Git

6 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Git provides safeguards to protect your active code branches from accidental deletion. When you try to delete a branch and receive the error: fatal: cannot delete branch 'xyz' used by worktree at '/path/to/folder', Git is warning you that the branch is currently checked out and actively linked to another working directory on your machine.

Here is why this error occurs, how to resolve it using three different methods, and how to use the listing commands to manage your workspace.

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
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

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
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

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'.

Git Commit Authors: How to Find, Change, and Configure Commit Identities

7 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Every Git commit records two distinct identities: the Author (who originally wrote the code) and the Committer (who applied the changes to the branch). While these are usually the same person, they can diverge during operations like rebasing, cherry-picking, or merging.

Whether you need to trace who wrote a line of code or fix a typo in your own commit email, this guide covers how to find, change, and automatically configure Git commit author details.

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

6 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

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."