Skip to content

Instantly share code, notes, and snippets.

@ialeke
ialeke / git_create_orphan.sh
Created March 5, 2022 16:31 — forked from seanbuscay/git_create_orphan.sh
Create an orphan branch in a repo.
cd repository
git checkout --orphan orphan_name
git rm -rf .
rm '.gitignore'
echo "#Title of Readme" > README.md
git add README.md
git commit -a -m "Initial Commit"
git push origin orphan_name