Skip to main content

Git Rebase: The Complete Guide to Rebasing, Undoing, and Advanced Workflows

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

Rebasing is one of Git's most powerful and frequently misunderstood tools. While merging integrates changes by creating a new merge commit, rebasing rewrites history by moving your commits onto a new base. This creates a clean, linear commit history.

However, rewriting history comes with risks. This guide covers how to rebase onto main, resolve conflicts, undo mistakes, utilize advanced interactive workflows, and when to avoid rebasing entirely.

Rebasing a local branch onto a remote branch

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

Rebasing a local branch onto a remote branch is a common workflow for keeping your feature branch up-to-date with the main development branch (like main or master) and maintaining a clean, linear commit history.

The process involves a few key steps: fetching the latest changes, checking out your local branch, performing the rebase, handling conflicts, and then force-pushing your changes if the branch was already shared.

How to install supabase cli

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

You can install the Supabase CLI using a variety of package managers, including npm, Homebrew, and Scoop, depending on your operating system. The CLI is a powerful tool that allows you to manage database migrations, develop locally, and deploy your project.

Supabase self host

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

Supabase is a Backend-as-a-Service (BaaS) platform that is almost entirely open source, which provides flexibility for developers. While their hosted service is what most people use, you have the freedom to self-host the entire stack. This open-source nature is a key differentiator when comparing it to other solutions like a custom stack with Hasura.

Python's @property vs. @classmethod - A No-Nonsense Guide

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

When you're diving into Python's Object-Oriented Programming (OOP) features, decorators like @property and @classmethod pop up all the time. They might seem similar at first glance, but they serve fundamentally different purposes. Getting them straight is key to writing clean, Pythonic code.

Let's cut through the noise and get straight to what they do and when you should use them.

Managing database queries in Django applications and where save the queries

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

As a Django app grows, managing database queries effectively is crucial for maintainability, performance, and testability. Storing them haphazardly is a recipe for disaster. The best place to store your queries is on custom Model Managers and QuerySets. This approach keeps your logic organized, reusable, and closely tied to the data it operates on. Here are the main variants for storing your queries, from the least recommended to the best practice.

Vercel vs GitHub pages comparison for project maker

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

What is better Vercel or GitHub pages in terms of customization and settings

If you're at a point where you want to build a site that goes beyond just a portfolio or a blog-something you might monetize, track analytics on, add dynamic features to, or even scale up into something bigger-it's important to choose your hosting platform wisely. GitHub Pages and Vercel are both wildly popular options, but they offer fundamentally different experiences once you want to do more than just put HTML online.

How to create a template snippet in VS Code that you can use after

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

Typing that boilerplate from scratch every time is not only tedious, but also error-prone. Fortunately, if you're using Visual Studio Code, there are excellent ways to automate this process by creating custom templates or snippets. Let's walk through some effective strategies for doing just that.

Python Doctests: The Complete Guide to Documentation-Driven Testing

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

Writing documentation is essential, but code examples in documentation frequently rot over time as codebases evolve. Python's built-in doctest module solves this problem by allowing you to write executable code examples directly inside your docstrings. The system verifies that the actual function output matches your documented example output.

By combining doctest (for living documentation correctness) and pytest (as your primary test runner), you get a symbiotic testing strategy that guarantees your code works and your documentation is always truthful.

This guide covers when to use doctests, how to write them, the various ways to execute them, and how to optimize your developer workflow in VS Code and Gitpod.

Looking for more content?
Hrekov Blog contains 165 articles. Browse the blog archive or Explore the full timeline.