Skip to content

Instantly share code, notes, and snippets.

@chalstrick
chalstrick / gist:7694959
Created November 28, 2013 16:57
shell script to show how native git handles certain file/folder conflicts during checkout
#!/bin/sh
set -x
# create the setup: first commit has x/y and second commit only x
git init
mkdir x
echo foo > x/y
git add x/y
git commit -m "add x/y"
@chalstrick
chalstrick / gist:2702364
Created May 15, 2012 14:51
Test Filesystem: difference between System.currentTimeMillis() and File.getLastModified().
import java.io.File;
import java.io.IOException;
public class TestFileSystem {
private static final int NR_OF_FILES = 1000;
public static void main(String[] args) throws IOException {
File tmpDir = new File(System.getProperty("java.io.tmpdir"), "tmp"
+ System.currentTimeMillis());
tmpDir.mkdirs();