Gerbrand-ICT, freelance programmer
I work at oneUp, as part of the Swarm-it team and with Plutus.
Most developers, like me, use Git for versioning. Even for personal projects, it’s great to have a history of files available. Deleting a file in git will cause it to remove from your working directory, while the file is still present in the history. Usually this is what you want, but sometimes you might want to remove a file completely including it’s history.
There’s a command for that but typically for git it’s not exactly intuitive. To alter history, you can use the filter-branch command. Filter branch can be supplied with a filter, which is a shell command that’s executed on each commit.
To purge a file from history, as if it never existed execute:
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch MYFILE public' HEAD
Where you can replace MYFILE with one or more files you want to delete.
If you want to purge a whole directory, including it’s content, add the -r switch:
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch MYDIRECTORY public' HEAD
Great if you checked in a large file, or file in a public repository that shouldn’t be public. For more information, read the git manual or the numerous tutorials that exist. For example, git-filter can also be used to move a file from one repository to another while preserving history.
// Dependencies var Cobol = require("cobol");
When .Net came out early 2000s, a Cobol compiler was offered too. There a also numerous way for interoperability from Cobol to Java as well. Both didn’t succeed in cornering and replacing Cobol as far as I know. Maybe Cobol in Nodejs will.
Some things that could help:
- In both .Net and even more in the Java / JVM world there’s a belief that eventually everything has to run in the Virtual Machine, as bytecode, or as .Net intermediate code. Both environments have excellent ways to interoperate with ‘native’ libraries written in C, but that’s less popular. In the Node.js world this quite a common way of working.
subscribe via RSS