Skip to main content

Fix “fatal - Not possible to fast-forward, aborting.” on Git Pull

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

This error usually appears when your local branch has diverged from the remote, and Git is configured to disallow non-fast-forward merges.


✅ Fix: Use git pull --rebase

git pull --rebase

This will reapply your local commits on top of the remote branch history, avoiding a merge commit.


📍 Alternative: Allow Merges

If you prefer merging instead of rebasing:

git config pull.ff false
git pull

This config allows Git to merge rather than fast-forward.


🔁 TL;DR

git pull --rebase  # preferred

or

git config pull.ff false
git pull

Use rebasing for a cleaner commit history 🚀

TBH my favourite commands are:

git fetch origin // it gets all the updates from the origin
git reset --hard origin/branch_name // replacing your local branch_name with origin version

Best Practices for Using Pydantic with Flask for Request and Response Serialization

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

Pydantic is widely known for its powerful data validation and parsing capabilities using Python type hints. While it's most popular with FastAPI, it can be elegantly integrated with Flask to improve request validation, input parsing, and response formatting.

This article outlines best practices for combining Flask with Pydantic in a clean, maintainable way.

Improved: Count Docs Posts in Docusaurus Including Folders

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

🔄 Update to: Count Number of Blog Posts in Docusaurus and Vercel

In my previous post, I shared a method to count the number of docs posts in a Docusaurus project and display it on your homepage, fully compatible with Vercel and static builds.

That method works great—if all your docs posts are plain .md or .mdx files in the docs/ directory.

But if you're like me and prefer organizing docs posts in folders (e.g., docs/folder/index.md), the previous approach silently misses those.

Improved: Count Blog Posts in Docusaurus Including Folders

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

🔄 Update to: Count Number of Blog Posts in Docusaurus and Vercel

In my previous post, I shared a method to count the number of blog posts in a Docusaurus project and display it on your homepage, fully compatible with Vercel and static builds.

That method works great—if all your blog posts are plain .md or .mdx files in the blog/ directory.

But if you're like me and prefer organizing blog posts in folders (e.g., blog/my-post/index.md), the previous approach silently misses those.

How to Display Blog Post Count on Docusaurus Homepage

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

Many developers using Docusaurus want to display the number of blog posts they have—especially on their homepage. While this may sound trivial, doing it the right way (that works on both your local dev and production builds like Vercel) requires some thought.

Here’s a simple and reliable way to implement this—no hacks, no unstable APIs, just clean engineering.

Git Rebase Onto Main (Full Guide, No Fluff)

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

You want to bring your feature branch up to date with the latest main, but you don’t want messy merge commits.

The solution: rebase.

Rebase reapplies your local commits on top of the latest main from remote. It keeps your commit history clean, linear, and easy to read — especially when preparing a pull request.