Skip to main content

15 posts tagged with "github"

github tag description

View All Tags

Create and use a private python library on github in your projects

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

Creating a private Python library on GitHub and using it in your projects is a great way to manage internal code, share reusable components across teams, and protect proprietary intellectual property. This process involves setting up a private repository, configuring your local environment for authentication, and then installing the library using a dependency manager like pip or poetry [1].

How is GFM different from CommonMark?

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

GitHub Flavored Markdown (GFM) is a strict superset of the CommonMark specification. This means that GFM includes all the features of CommonMark and adds several of its own, making it a more feature-rich dialect of Markdown.

The key differences between GFM and CommonMark lie in the extra features GFM provides to support the collaborative nature of a platform like GitHub.

Github flavored markdown syntax

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

GitHub Flavored Markdown (GFM) is a superset of the CommonMark specification, which means it includes all the standard Markdown features plus several useful additions. It's the dialect of Markdown used on GitHub for things like issues, pull requests, wikis, and comments.

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.

Discard all local changes and pull the latest version from a GitHub

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

To discard all your local changes and pull the latest version from a GitHub repository, you need to completely reset your local branch to match the remote's state. This process involves a few steps to ensure all uncommitted and committed local changes are removed.

This guide covers the most reliable methods, including situations where you've already made local commits.

Conventional Commits Cheat Sheet 2025

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

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

Fix - you have divergent branches in Git

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

How to Fix "You have divergent branches" Error

The "You have divergent branches" error is a Git warning, not a hard error that stops your operation. It appears when your local branch and the corresponding remote branch have both moved forward, creating a divergent history. Git is telling you that a simple fast-forward merge is not possible and you need to choose a strategy to reconcile the differences before your next git pull.

The error message itself provides the three main solutions: merge, rebase, or fast-forward only.

Git error: 'main/' does not have a commit checked out`

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

The error error: 'main/' does not have a commit checked out occurs when Git tries to add files to a submodule that is in a detached HEAD state or has no checked-out commit. This happens because the main repository expects the submodule to point to a specific commit, but it's in an invalid state.

To fix this, you need to navigate into the submodule's directory and check out a commit, usually by switching to the main branch or a specific branch.

Fix Git refusing to merge unrelated histories

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

The "refusing to merge unrelated histories" error occurs when you try to merge two branches that do not share a common history. This typically happens when you initialize a new Git repository and then try to pull a remote repository's contents into it, as Git sees them as two completely separate projects.

To solve this, you can use the --allow-unrelated-histories flag. This flag forces Git to merge the two independent histories, creating a merge commit that joins them together.

Fix git pull - not possible to fast-forward

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

How to Solve "Not Possible to Fast-Forward" with git pull

The git pull "Not possible to fast-forward" error happens when your local branch and the remote branch have diverged. This means there are new commits on the remote branch that you don't have, and you also have local commits that are not on the remote branch. Git cannot simply move your branch pointer forward (fast-forward) because doing so would lose your local changes.

To fix this, you must explicitly tell Git how to merge the divergent histories. There are two primary solutions: using git pull with rebase or performing a standard git pull followed by a manual merge.