Tag: bash

Optimize many PDFs at once

I had to work with many scanned PDF documents that were saved in a very un-optimal way, each one having up to tens of MBs. This was not suitable for sending via email and also unnecessary. I saw an option on my girlfriend's Mac to optimize PDF. The result was that her document dr…

Issues restoring Gitea from dump

Somehow, the official documentation for restoring Gitea from dump did not work for me. Roughly, the following command for the original rootful Docker image could look like this: /app/gitea/gitea dump --file gitea-dump.zip -c /data/gitea/conf/app.ini --skip-lfs-data --skip-reposit…

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…