All posts by kortsi
Remove Unwanted Files From Git History
Here’s an example of how to remove every *.pyc file from every commit in Git history. It is adapted from this Git help page.
Rewrite history
Run git filter-branch
, forcing (--force
) Git to process—but not check out (--index-filter
)—the entire history of every branch and tag (--tag-name-filter cat -- --all
), removing the specified files ('git rm --cached --ignore-unmatch *.pyc'
) and any empty commits generated as a result (--prune-empty
). Continue reading Remove Unwanted Files From Git History
Split horizon DNS master/slave with Bind
A better way to block brute force attacks on your SSH server
Peter Selinger: Tutorial on multiple currency accounting
How do you discard unstaged changes in git?
How do you discard unstaged changes in git?
git clean -df
git checkout — .
Adding Git version control to web sites
Here’s a little script I made to make it easy to put a number of existing web sites residing under /var/www under version control by Git. Regarding security, it is obviously not a good idea to initialize the Git repository directly under the site directory, since from there it might be served by the web server to the outside world. And that is not what I want. Instead what I want is to have the Git working directory directly in the site directory that is served, and the repository somewhere else. That is perfectly possible with Git, just by setting one or two environment variables. Continue reading Adding Git version control to web sites
About variable overriding behavior of Jinja2
Render Bootstrap 3 forms with WTForms and Jinja
PHP: a fractal of bad design
How to detect a user pan/touch/drag on android map v2
How to detect a user pan/touch/drag on android map v2
Thanks Dimitar!