Skip to content

Instantly share code, notes, and snippets.

@daniel-fanjul-alcuten
Created July 25, 2013 13:24
Show Gist options
  • Save daniel-fanjul-alcuten/6079562 to your computer and use it in GitHub Desktop.
Save daniel-fanjul-alcuten/6079562 to your computer and use it in GitHub Desktop.
create snapshot of HEAD
$ cp .git/index .git/index2
$ touch a
$ GIT_INDEX_FILE=.git/index2 git add a
$ GIT_INDEX_FILE=.git/index2 git write-tree
833db9db6007ba78fc3e5e10ccde7a1350bd6e1d
$ git commit-tree 833db9db6007ba78fc3e5e10ccde7a1350bd6e1d -p HEAD
foo
816a78f5fb38fddc4c05259e61c360f47425b1fb
$ d 816a78f5fb38fddc4c05259e61c360f47425b1fb
diff --git c/a w/a
deleted file mode 100644
index e69de29..0000000
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment