Skip to content

Instantly share code, notes, and snippets.

View T12z's full-sized avatar

Thorsten Schulz T12z

View GitHub Profile
@T12z
T12z / gist:b6bde764a55d9e8277b0c36543072f93
Created March 29, 2019 20:10 — forked from adeluccar/gist:d105299f2d5af55e3e96f9b989e7eb48
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
@T12z
T12z / sweep_scade.c
Created May 21, 2019 16:11
Filter out annotations in xscade files (e.g., scade_model_without_unused.scade)
/*
============================================================================
Name : sweep_scade.c
Author : Thorsten Schulz <thorsten.schulz@uni-rostock.de>
Version :
Copyright : (c) 2019 with terms of EUPL
Description : A stream filter to purge all the _x_scade annotations in the
final blob before code generation. Mostly for stats.
============================================================================
*/