Created
August 31, 2016 18:42
-
-
Save progrium/6ec40a63549e25196dcee824e9407f54 to your computer and use it in GitHub Desktop.
make an empty branch (destroy) on a bare repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
blob="$(git hash-object -w --stdin < /dev/null)" | |
git update-index --add --cacheinfo 0644 "$blob" file | |
tree="$(git write-tree)" | |
commit="$(echo file | git commit-tree $tree)" | |
git update-ref refs/heads/destroy $commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment