Skip to content

Instantly share code, notes, and snippets.

@fanktom
Last active December 31, 2015 20:08
Show Gist options
  • Save fanktom/8037685 to your computer and use it in GitHub Desktop.
Save fanktom/8037685 to your computer and use it in GitHub Desktop.
Init a root branch in a current git repository
#!/bin/bash
git symbolic-ref HEAD refs/heads/$1 && rm .git/index && git clean -fdx
@echo "Created new root branch '$1'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment