Skip to content

Instantly share code, notes, and snippets.

View felixvd's full-sized avatar

Felix von Drigalski felixvd

  • Mujin Inc.
  • Tokyo, Japan
View GitHub Profile
@adeluccar
adeluccar / gist:d105299f2d5af55e3e96f9b989e7eb48
Created August 8, 2017 22:50
How to Flatten the History of a Git Repository Safely
git checkout --orphan future-master
git add -A  # Add all files and commit them
git commit
git branch -D master  # Deletes the master branch
git branch -m master  # Rename the current branch to master
git push -f origin master  # Force push master branch to github
git gc --aggressive --prune=all     # remove the old files
@hsperr
hsperr / matecat_hotkey.js
Last active March 27, 2023 02:30
Greasemonkey/Tampermonkey script to add hotkeys to the Review mode of Matecat.
//Author: Henning Sperr <henning.sperr@gmail.com>,
// Felix von Drigalski <fvdrigalski@gmail.com>
// License: BSD 3 clause
// ==UserScript==
// @name Matecat Review Hotkeys
// @namespace http://tampermonkey.net/
// @version 0.2
// @description try to take over the world!
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule