11

I added a subtree via

git subtree add --prefix=path/to/example --squash git@github.com:johndoe/example.git master

and want to remove it. There's no git subtree rm command. I already deleted all files in path/to/example but path/to/example still appears when I list subtrees via

git log | grep git-subtree-dir | awk '{ print $2 }'

How can I remove the subtree reference from git such that it can no longer be pushed/pulled/etc.?

Community
  • 1
  • 1
ryanve
  • 50,076
  • 30
  • 102
  • 137

1 Answers1

6

Simply remove the remote, which is the subtree reference: git remote rm example