Tag: git

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…

Finally understood git reset

Git is a rather beefy tool, boasting up to 150 subcommands, with the exact figure varying depending on the git version. Using the method from the thread on my machine: $ git help -a | grep "^ " | wc -l 144 The 144 subcommands currently, however skewed the above metric…

Another way to combine local repositories

A quick and dirty way I usually combine private repositories is to use the --rebase option for git pull. I have written about such option already in a post about keeping git fork in sync with the upstream. Here's how to do it: git remote add --fetch other ../other-repository git …