Tag: git

Post checkout composer install hook

Sometimes when working on a PHP project where there are a lot of branches potentially sitting on incompatible packages, it can be a pain to always remember to manually run composer i or whatever docker alternative or alias one might be using. After forgetting, there are error mes…

Restore data from Gitea restic backup

Just a very quick update about how I was able to restore a git repository stored inside a Gitea and backed up via restic. Warning: this guide most probably does not work correctly with LFS files, but they might either not be that critical to restore or the repository might not e…

Merge repos using git-filter-repo

I have already written how useful a tool git filter-repo is for cleaning repositories. I made some extensive use of the newfound knowledge since to undo some previous bad decisions in my private repositories. Here's a list of commands for merging project-a into project-b for a re…

Git sign previous commits keeping dates

Sometimes you might need to re-sign your previous commits using GnuPG. This process rewrites the git history in a sense of changing commit hashes. What is more, it also changes the date when commit was made. If not done properly, the repository looks like if there was no history …

Clever uses for git-filter-repo

There is a common saying around version control systems stating the following: Do not rewrite the history. And it is pretty solid saying to be fair, supported at many threads, for instance at FS#45425 or elsewhere. You simply have to assume that once you pushed something into t…