Skip to content

Instantly share code, notes, and snippets.

@orent
orent / git-neck
Created April 25, 2018 15:21
git-neck: a tool for splitting commits
#!/bin/sh
# https://opensource.org/licenses/MIT (c) 2018
# Oren Tirosh <orent@hishome.net>
#
# See and change what your repository looks like from the neck down.
#
# Under git-neck, the HEAD is HEAD^ and worktree is HEAD.
# If you make any changes to the neck, your real HEAD commit is adjusted
# so that its content remains unmodified with the exact same tree hash.
# If you look at it as the difference from its (now modified) parent it